JS性能

获取以下属性  会等待对应元素渲染完成  才继续执行

* offsetTop, offsetLeft, offsetWidth, offsetHeight
* scrollTop, scrollLeft, scrollWidth, scrollHeight
* clientTop, clientLeft, clientWidth, clientHeight
* getComputedStyle() (在IE中为currentStyle)

PS 如果该元素display为none 或者其父元素display为none  总之该元素没有显示在浏览器中  这些属性得到的值都是0

原文地址:https://www.cnblogs.com/cart55free99/p/3796549.html