IE6中的position:fixed定位兼容性写法分享
IE6中的position:fixed定位兼容性写法分享
发布时间:2016-12-27 来源:查字典编辑
摘要:非IE6下的写法大家一般都清楚如何写;这里就不展示了;切入正题,以下的IE6下CSS的兼容性写法:/*修正IE6振动bug*/html,*h...

非IE6下的写法大家一般都清楚如何写;这里就不展示了;

切入正题,以下的IE6下CSS的兼容性写法:

/* 修正IE6振动bug */

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

/* IE6 头部固定 */

html .fixed-top{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}

/* IE6 右侧固定 */

html .fixed-right{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}

/* IE6 底部固定 */

html .fixed-bottom{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)));}

/* IE6 左侧固定 */

* html .fixed-left{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}

不信?还不去试试?

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新 Div+Css教程学习
热门 Div+Css教程学习
网页设计子分类