尺寸

2018-04-01  本文已影响0人  蘑菇酱960903

element.getBoundingClientRect()
返回
x: 元素在水平位置的横坐标
y: 元素在垂直位置的纵坐标
width: 元素的宽度
height: 元素的高度
top: 相对于根元素的top位置
left: 相对于根元素的left位置
right: 相对于根元素的right位置
bottom: 相对于根元素的bottom位置

上一篇 下一篇

猜你喜欢

热点阅读