IE6不支持 position:fixed 时
2016-01-18 14:42
281 查看
底部固定:
顶部固定:
右侧固定:
左侧固定:
必须添加此段css,否则IE6会出现闪动
.box{ _position:absolute; _bottom:auto; _margin-bottom:100px; _top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0))); }
顶部固定:
.box{ _position:absolute; _bottom:auto; _margin-top:100px; _top:expression(eval(document.documentElement.scrollTop)); }
右侧固定:
.box{ _position:absolute; _right:auto; _margin-right:100px; _left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}
左侧固定:
.box{ _position:absolute; _right:auto; _margin-left:100px; _left:expression(eval(document.documentElement.scrollLeft)); }
必须添加此段css,否则IE6会出现闪动
* html,* html body {background-image:url(about:blank);background-attachment:fixed;}
相关文章推荐
- linux find
- [Leetcode]Edit Distance
- 建造者模式学习笔记
- collection动画
- 天文望远镜(四)
- 直方图均衡化
- 快速排序
- 编译JDK
- tomcat启动时间的设置
- hadoop 集群环境搭建
- [leetcode] 151. Reverse Words in a String 解题报告
- jfreechart配合struts2简单配置及使用
- CSharpGL(9)解析OBJ文件并用CSharpGL渲染
- LeetCode Range Sum Query - Mutable
- display:table-cell两列自适应布局
- iOS 实现图文混排
- JAVA读取BMP图片文件
- BitnamiGitLab备份升级操作
- ADO.NET基础01(ADO.NET组成,数据库的方式,SqlCommand,SqlDataReader)
- php自带过滤函数