您的位置:首页 > 其它

解决IE6不支持position:fixed的bug

2013-12-30 18:24 453 查看
/*完整代码 */

/* 除IE6浏览器的通用方法 */
.ie6fixedTL
{
position: fixed;
left: 0;
top: 0;
}
.ie6fixedBR
{
position: fixed;
right: 0;
bottom: 0;
}
/* IE6浏览器的特有方法 */
/* 修正IE6振动bug */
* html, * html body
{
background-image: url(about:blank);
background-attachment: fixed;
}
* html .ie6fixedTL
{
position: absolute;
left: expression(eval(document.documentElement.scrollLeft));
top: expression(eval(document.documentElement.scrollTop));
}
* html .ie6fixedBR
{
position: absolute;
left: expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));
top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: