摘要:        
用js获取元素定位,发现chrome下,忽略了元素offsetHeight。其他浏览器可以根据子元素的样式计算出父级的高度,盒模型。而chrome则不可以、得为其元素设置高度,才能再通过js获取到offsetHeight。firfox:chrome:设置height由于元素<span>为行内元素,还得添加display:block。chrome:另外一个点,offsetHeight|clientHeight的区别: offsetHeight包含height、padding、scrollBar、border。 clientHeight包含height、padding。 http://    阅读全文
posted @ 2011-11-24 10:59
zaric
阅读(890)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号