
一、网页背景半透明
网页背景半透明
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=http://www.gimoo.net/t/1409/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;}
三、浮动IE6双边距
1、为浮动元素使用display:inline;
2、IE6下3px间距bug:在IE6中,当文本(或无浮动元素)跟在一个浮动的元素之后,文本和这个浮动元素之间会多出3px的间隔,给浮动层添加display:inline或设计-3px的间距来解决这个bug。
3像素间距bug
div css中最小高度min-height
方法一:
#DIVname {
min-height:150px;
*height:auto!important;
_height:150px;
overflow:visible;
}
方法二:
#DIVname {
min-height:1000px;
_height:expression((document.documentElement.clientHeight||document.body.clientHeight)