Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 360 Bytes

File metadata and controls

12 lines (8 loc) · 360 Bytes

scrollHeight VS offsetHeight

2017-06-01

不同

简单来说就是scrollHeight计算的是可见区域的高度, offsetHeight对于overflow: hidden隐藏的部分不算入高度中

getComputerStyle

scrollHeight和offsetHeight呢都是只取整数部分, getComputerStyle可以精确到小数位=

深度对比

先占位, 未完待续...