getBoundingClientRect()

getBoundingClientRect的用法 语法 rectObject = object.getBoundingClientRect(); element.getBoundingClientRect()方法返回元素的大小及其相对于可视窗口的位置。 返回值 返回值是一个Obj Obj.top:元素上边到视窗上边的距离; Obj.right:元素右边到视窗左边的距离; Obj.bottom:元素
相关文章
相关标签/搜索