zoukankan      html  css  js  c++  java
  • Web-js中级-11月12日

    元素的属性

    Div.attributes  是所有标签属性构成的数组集合

    Div.classList 是所有class名构成的数组集合‘  

      在class的原型链上可以看到add()’和remove()

    1.   client系列

      

    (1)clientWidth/clientHeight  是我们设置的宽和高加上内边距  (没有边框)

        clientLeft/clientTop  就是我们设置的边框值

    2.  Offset系列

      

      offsetWidth/offsetHeight是我们设置的宽和高加  上边框  加上   内边距。(有边框)

      offsetLeft/offsetTop   是元素外边距距离父级内边距的距离

      这个父级由定位  position:absolute;

      offsetTop  参照物由父级元素身上的   position:absolute/fixed决定的;如果父级元素没有就逐层向上查找知道body。

      offsetParent  返回这个元素的父级元素。

    3.    Scroll系列

     

    scrollWidth/scrollHeight  就是我们设置的宽高加上内边距(内容没有溢出的前提下)

    如果超出了范围就按内容而定。

    scrollTop/scrollLeft   滚动条卷走的高度和宽度

  • 相关阅读:
    shell awk
    spl_autoload_register array参数
    install xdebug on fedora
    call_user_func
    转载 shell sort
    通过nginx + lua来统计nginx上的监控网络请求和性能
    nginx 知识点
    python 发送带附件的 邮件
    xdebug php
    关于ZendStudio 10.5的破解
  • 原文地址:https://www.cnblogs.com/lovels/p/9948765.html
Copyright © 2011-2022 走看看