JS性能

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

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

 

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

posted @ 2014-06-19 14:46  cart55free99  阅读(99)  评论(0编辑  收藏  举报