手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >IE6中的position:fixed定位兼容性写法分享
IE6中的position:fixed定位兼容性写法分享
摘要:非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));}

不信?还不去试试?

【IE6中的position:fixed定位兼容性写法分享】相关文章:

ie placeholder属性的兼容性问题解决方法

IE与Firefox的CSS兼容大全

CSS在IE和Firefox兼容要点分析

ie6不兼容hover ie6 a hover属性失效解决办法

通过position定位实现div底端对齐

详解CSS的定位语法应用

IE.JS解决IE兼容性问题方法汇总

CSS中background-position使用技巧

CSS中背景background-position负值定位深入理解

CSS3中动画属性transform、transition和animation属性的区别

精品推荐
分类导航