手机
当前位置:查字典教程网 >网页设计 > 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定位兼容性写法分享】相关文章:

CSS中文字体对应的英文写法

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

CSS的position属性在DIV层中的应用

浏览器不支持position: fix的解决

网页中css内容换行控制

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

CSS在IE和Firefox兼容要点分析

CSS中常用的缩写方式

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

IE中css属性writing-mode使用

精品推荐
分类导航