有两种让IE6支持position:fixed
1.用CSS执行表达式
*{margin:0;padding:0;}
* html,* html body{ background-image:url(about:blank);background-attachment:fixed;
}
* html .fixed{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));
}
.fixed{position:fixed;bottom:0px;top:auto;
}
2.让body保持其原有高度,让html只有一个窗口那么高
*{margin:0;padding:0}
*html{overflow:hidden;}
*html body{height:100%;overflow:auto;}
.fixed{position:fixed; _position:absolute;left:0;bottom:0;
}