IE6 兼容收集

一:overflow:hidden失效

当父元素的直接子元素或者下级子元素的样式拥有position:relative属性时,父元素的overflow:hidden属性就会失效。

CSS代码:

#parent{height:50px;overflow:hidden;} 
#child a{position:relative;}

我们在IE 6内发现子元素会超出父元素设定的高度,即使父元素设置了overflow:hidden。 
方法一:在父元素中使用position:relative;即可解决该bug

即css:

#parent{height:50px;overflow:hidden;position:relative;} 
#child a{position:relative;}

方法二:

#parent{height:50px;overflow:hidden;zoom:1;} 
#child a{position:relative;}

注:部分内容参考自网络

待续---

原文地址:https://www.cnblogs.com/iwhk/p/3463761.html