blog
blog copied to clipboard
【大前端】分享记录
Results
31
blog issues
Sort by
recently updated
recently updated
newest added
# 什么导致强制布局/重排 [原文链接](https://github.com/Godiswill/blog/issues/3) [英文原文:What forces layout / reflow](https://gist.github.com/paulirish/5d52fb081b3570c81e3a) 以下所有属性或方法,当在 JS 中读写或调用,都将触发浏览器同步计算样式或布局。也被叫做重排或[布局抖动](http://www.kellegous.com/j/2013/01/26/layout-performance/),这通常是页面性能瓶颈。 ### 元素 ##### 盒模型 * `elem.offsetLeft`, `elem.offsetTop`, `elem.offsetWidth`, `elem.offsetHeight`, `elem.offsetParent` * `elem.clientLeft`, `elem.clientTop`, `elem.clientWidth`, `elem.clientHeight` * `elem.getClientRects()`, `elem.getBoundingClientRect()` #####...