解决IE使用css表达式模拟fixed效果时抖动问题
2012-04-09 19:01
645 查看
<!doctype html> <html> <head> <meta charset="gbk" /> <title>IE6 fixed</title> <style> .img1 { position:fixed; left:0; bottom:10px; _position:absolute; _top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||10)-(parseInt(this.currentStyle.marginBottom,10)||10))); } .img2 { position:fixed; right:0; top:200px; _position:absolute; _top: expression(eval(document.documentElement.scrollTop + 200)); } * html,* html body {background-image:url(#);background-attachment:fixed;}/* 修正IE6 fixed振动bug */ </style> </head> <body style="height:9000px"> <img style="height:135px;" class="img1" src="http://img01.taobaocdn.com/tps/i1/T1TJ16XmxdXXXXXXXX-440-135.jpg"> <img style="height:135px;" class="img2" src="http://img01.taobaocdn.com/tps/i1/T1TJ16XmxdXXXXXXXX-440-135.jpg"> </body> </html>
相关文章推荐
- 在head标签里加一个meta标签让指定ie使用特定内核 解决css在ie中的兼容性问题
- 使用 jquery-autocomplete插件 完成文本框输入自动填充联想效果 解决兼容IE输入中文问题
- 终极解决:JQ jquery 在使用 animate 的时候出现抖动情况,Chrome、IE都会出现这个问题
- 解决RD2作业在IE和Fire Fox中CSS效果不同的问题~
- CSS表达式(expression)解决IE6 position:fixed无效问题
- 真正完美解决IE6下position:fixed问题的方法{使用expression()没有抖动}
- 解决CSS、JS文件更新网站效果却没实时更新的问题
- 模拟select的功能,解决IE高度不兼容的问题
- html + css 在设置了 z-index 属性后没效果的问题解决办法
- IE7下解决A标签使用padding宽度自适应 padding失效的问题
- 解决canvas画布使用fillRect()时高度出现双倍效果的问题
- android新特性:使用CollapsingToolbarLayout实现折叠效果及问题解决
- cssIE6解决无法实现position:fixed浮动层固定在滚动页面(无抖动)
- important的妙用解决firefox和ie的css兼容问题
- 解决使用属性动画没有效果,监听发现属性值未发生改变问题
- 解决Windows和Linux使用npm打包js和css文件不同的问题
- 关于CSS中内层使用float导致外层的背景无法显示的问题的解决方法
- 优化 html 标签 为何能用HTML/CSS解决的问题就不要使用JS?
- JQuery datatables 使用Fixedcolumns固定列控件 多选框选中问题解决方案
- 【浏览器兼容性】css解决IE、Firefox兼容的div高度100%的问题