您现在的位置是:网站首页> 编程资料编程资料

IE6中的position:fixed定位兼容性写法分享IE 6不支持min-height或max-width等属性的完美解决方案CSS中针对IE6、7和FF等浏览器的特殊样式写法经典的IE6的高度问题-div默认存在3个像素高IE6 div最小高度去除方法以及IE6div垂直居中css样式

2021-09-06 982人已围观

简介 这篇文章主要介绍了IE6中的position:fixed定位兼容性写法分享,需要的朋友可以参考下

非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));}

不信?还不去试试?

相关内容

-六神源码网