.getBoundingClientRect()

时间:2023-03-09 07:58:23
.getBoundingClientRect()

.getBoundingClientRect() 该方法获得页面中某个元素的左,上,右和下分别相对浏览器视窗的位置,他返回的是一个对象,即Object,该对象有4个属性:top,left,right,bottom;

.getBoundingClientRect()