element.getBoundingClientRect()
返回
x: 元素在水平位置的横坐标
y: 元素在垂直位置的纵坐标
width: 元素的宽度
height: 元素的高度
top: 相对于根元素的top位置
left: 相对于根元素的left位置
right: 相对于根元素的right位置
bottom: 相对于根元素的bottom位置
element.getBoundingClientRect()
返回
x: 元素在水平位置的横坐标
y: 元素在垂直位置的纵坐标
width: 元素的宽度
height: 元素的高度
top: 相对于根元素的top位置
left: 相对于根元素的left位置
right: 相对于根元素的right位置
bottom: 相对于根元素的bottom位置
本文标题:尺寸
本文链接:https://www.haomeiwen.com/subject/pmfzcftx.html
网友评论