两种解决IE6不支持固定定位的方法
2014-08-05 11:56
281 查看
有两种让IE6支持position:fixed
1.用CSS执行表达式
2.让body保持其原有高度,让html只有一个窗口那么高
1.用CSS执行表达式
*{margin:0;padding:0;} * html,* html body{ background-image:url(about:blank); background-attachment:fixed; } * html .fixed{ 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))); } .fixed{ position:fixed; bottom:0px; top:auto; }
2.让body保持其原有高度,让html只有一个窗口那么高
*{margin:0;padding:0} *html{overflow:hidden;} *html body{height:100%;overflow:auto;} .fixed{ position:fixed; _position:absolute; left:0; bottom:0; }
相关文章推荐
- 解决IE6下浮动层固定定位的经典方法
- 解决ie6下不支持fix属性,模拟固定定位
- IE6不支持position:fixed的解决方法
- IE6 图片固定在最右下角,不抖解决方法
- 解决IE6浏览器下position:fixed固定定位问题
- 完美解决IE6不支持hover的方法
- ie6下不支持png格式的解决方法
- 一个解决ie6不支持:hover、属性选择器等问题的方法
- IE6-IE9不支持table.innerHTML的解决方法分享
- 解决 IE6 position:fixed 固定定位问题
- 解决IE6浏览器下position:fixed固定定位问题
- 让IE6支持png 透明的三种解决方法
- 解决 IE6 position:fixed 固定定位问题
- 解决IE6浏览器下position:fixed固定定位问题
- 解决 IE6 position:fixed 固定定位问题
- css 兼容ie6,ie7,ff的fixed,元素上下端固定定位方法
- IE6下position:absolute定位错误的bug和解决方法
- 两种办法解决IE6下非链接不支持hover的问题
- IE6不支持position:fixed的解决方法