让IE6 支持fixed定位
1 /** 纵向底部 **/
2 #d1 {
3 position: fixed;
4 top:100px;
5 left:200px;
6 height:50px;
7 width:100px;
8 background:red;
9 _position:absolute;
10 _bottom:auto;
11 _top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-
(parseInt(this.currentStyle.marginTop)||0)-(parseInt(this.currentStyle.marginBottom)||0)));
12 }
13 /** 居中 **/
14 #d2 {
15 top:100px;
16 left:300px;
17 height:50px;
18 width:100px;
19 background:blue;
20 _position:absolute;
21 _bottom:auto;
22 _top:expression(eval(document.documentElement.scrollTop+(document.documentElement.clientHeight-this.offsetHeight)/2-20-
(parseInt(this.currentStyle.marginTop)||0)-(parseInt(this.currentStyle.marginBottom)||0)));
23 _left:expression(eval(document.documentElement.scrollLeft+(document.documentElement.clientWidth-this.offsetWidth)/2-
(parseInt(this.currentStyle.marginTop)||0)-(parseInt(this.currentStyle.marginBottom)||0)));
24 }