代码如下:
opacity:0.8;
filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=80)";IE6中CSS方法解决PNG图片半透明问题:
#DIVname {
width: 300px;
height: 99px;
background: url('images/top.png') no-repeat top;
*background: none;
*filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='corp', src='template/flower/images/top.png');
}
代码如下:
.clearfix:after{content:"."; display:block; height:0; clear:both; visibility:hidden}
.clearfix{display:inline-block}
.clear{height:0; line-height:0; font-size:0; overflow:hidden; clear:both; display:block;}
*html .clearfix{height:1%;}
.clearfix{display:block;}
代码如下:
#DIVname {
min-height:150px;
*height:auto!important;
_height:150px;
overflow:visible;
}
代码如下:
#DIVname {
min-height:1000px;
_height:expression((document.documentElement.clientHeight||document.body.clientHeight)>1000?"1000px":"");
}
五、IE下z-index 的 bug
一般来讲,ie对父级的要求比较高,如果父级有position属性,但是没有给z-index属性,那默认都是0,所以不论子集里面有多高的z-index属性,都是没用的。
所以一般情况下,需要给包含z-index属性的父级一个z-index:1的属性,这样可以解决很多莫名其妙的问题。
六、IE6调整窗口大小的bug
当把body居中放置,改变IE浏览器大小的时候,任何在body里面的相对定位元素就会固定不动了,解决方法是给body定义position:relative;就行了。
七、文字大小和行高不兼容
同样大小的相同字体,各浏览器下行高和大小不一样,需要设定line-height。
八、mirror margin bug
在IE6下,当外层元素内有float元素时,外层元素如定义margin-top:5px,将自动 生成margin-bottom:5px,padding也会出现类似问题,解决方案:外层元素设定border或float。
九、img下的留白
在html里面有:
文字
,很遗憾,在ie6下单行文字 line-height 效果消失了。。。,原因是这个inline-block元素和inline元素写在一起了。解决方案:让img 和文字都 float起来。