解决ie6下position:absolute不兼容问题
2016-04-12 12:02
218 查看
<span style="font-family: Arial, Helvetica, sans-serif;"></span>
body{9000px;} /*让浏览器出现滚动条*/ .fixed{ position:fixed; /*对于火狐等其他浏览器需要设置的*/ top:700px; /*同上*/ width:30px; height:30px; cursor:pointer; display:none; } .ie{ _position: absolute; _clear: both; _top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop +(documentElement.clientHeight-this.clientHeight) - 1 : document.body.scrollTop +(document.body.clientHeight-this.clientHeight) - 1); }
<div id="goTop_div" class="fixed ie"> </div>
ie6对position:fixed不支持,网上有很多解决方法,有的在ie6,ie7上调试成功后,在ie8上又不好使,div层还是跟随滚动条浮 动;以下总结方法,在ie6,ie7,ie8上都调试成功,且页面滚动条滚动时,效果还挺好,div层并不会闪烁。
相关文章推荐
- linux第八周
- python字符串连接方法分析
- 实现文字的渐变效果
- C++计数排序详解
- 依据记录总数和每页大小取页数
- 关于EditText中的TextWatcher监听
- 怎么注册教育咨询公司
- PHP unicode 与 utf-8 转码,还是很有意思的
- StarUML破解
- Mysql修改时间的年月日,时分秒不变
- Git常用操作命令收集
- hdu-1530-Maximum Clique-找最大团
- Quartz任务调度
- Ajax分页
- 网络流题目泛做(费用流的不写在这里面)
- Constructor函数中的explicit
- JOB语句
- IOS基础点总结
- android 安卓4.4 5.0 5.1 6.0支付flash的源码支持as2.0 flash
- 【Android】IPC机制(二)