width: 300px; height: 200px; border: 10px solid #666; padding: 5px; overflow: hidden;
Its total visible width and height are therefore 330 pixels (300 width + 10 padding + 20 border).
width: 300px;
height: 200px;
border: 10px solid #666;
padding: 5px;
overflow: auto;
在ie6和ie7中,clientWidth包含滚动条的宽度; 在其它A级浏览器以及ie8 beta1中,clientWidth减去了滚动条的宽度
width: 300px;height: 200px;border: 10px solid #666; padding: 5px;overflow: auto;
在ie6和ie7中,clientWidth == 0
解决办法是通过zoom: 1等方式使得hasLayout为true
注意:此时offsetWidth有值
width: 300px;height: 200px;border: 10px solid #666; padding: 5px; overflow: auto; zoom: 1;
#test4和#test5样式完全一样,
但在ie7中,clientWidth的值不同。
当zoom: 1遭遇overflow时,ie7很诡异
width: 300px;height: 200px;border: 10px solid #666; padding: 5px; overflow: auto; zoom: 1;
#test4和#test5样式完全一样,
但在ie7中,clientWidth的值不同。
当zoom: 1遭遇overflow时,ie7很诡异