DOM

2017-08-02  本文已影响0人  刘晓洋
            nodeType       nodeName       nodeValue
元素节点        1            大写的标签名     null
文本节点        3            #text          文本内容
注释节点        8            #comment       注释内容
document节点    9           #document       null
getBoundingClientRect() 这个方法返回一个矩形对象,包含四个属性:left、top、right和bottom。分别表示元素各边与页面上边和左边的距离。
e.offsetX :到左边的距离
上一篇 下一篇

猜你喜欢

热点阅读