IE6 CSS

IE6 高度等于外围的高度

1
2
height=#bpic的高度:height:expression(document.getElementById('bpic').offsetHeight+"px");
height=body的高度:height:expression(document.body.offsetHeight+ "px");

IE6 图片最大宽度

1
2
max-width:695px;
_width: expression(this.width > 695 ? 695 : true);

IE6 图片最小高度166px

1
2
min-height:166px;
_height:expression((document.documentElement.clientHeight||document.body.clientHeight)>166?"166px":"");

IE6 高度=外围ID的高度(id=”case”)

1
2
height:100%;
_height:expression(document.getElementById('case').offsetHeight+'px');

IE6 背景透明 png24

1
2
3
4
5
.qq {
background:url(../images/pic/top.png) no-repeat;
_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://img0.bdstatic.com/static/widget/common/top/images/to-top_6744d50c0e.png');//ie6
_background:0 //ie6
}

IE6 最小宽度

1
2
3
4
.wrapper {
min-width:500px;
_width:expression((document.documentElement.clientWidth||document.body.clientWidth) < 500 ? "500px": "auto"); //ie6
}

IE6 position:fixed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
.gotop {
position:fixed;
z-index:100;
top:10px;
right: 0px;
_position:absolute;//ie6
_top:auto;//ie6
_top:expression(eval(document.documentElement.scrollTop)+10);//ie6
}

*html {
background-image:url(about:blank);//ie6
background-attachment:fixed;//ie6
}

IE6 fixed bottom的高度

1
2
3
4
5
6
7
8
9
10
11
12
.qq {
position:fixed;
right:5px;
bottom:100px;
_position:absolute;//ie6
_bottom:auto;_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||100))); //ie6
}

*html {
_background-image:url(about:blank);
_background-attachment:scroll
}