IE6中的position:fixed定位兼容性写法分享
浏览:29日期:2024-06-25
非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));}不信?还不去试试?
相关文章:
热门推荐

- Golang 如何判断数组某个元素是否存在(isset)
- 1.浏览器兼容之旅第三站:IE常见Bug总结及修复方法—part1
- 2.CSS优先级和!important与IE6的BUG讨论及解决方案
- 3.Golang Http 验证码示例实现
- 4.hbuilder无法访问您的文件
- 5.IE6中a标签同时使用inline-block与text-indent时出现的BUG
- 6.hbuilderhbuilder怎么安装
- 7.构建Golang应用最小Docker镜像的实现
- 8.PHP设计模式之策略模式原理与用法实例分析
- 9.JS判断浏览器是否安装flash插件的简单方法
- 10.Golang 使用map需要注意的几个点
