仿天涯底部固定漂浮导航
原文地址:http://www.uecss.com/index.php/fixed-floating-imitation-navigation/
body {
background-image:url(text.txt); /* for IE6 */
background-attachment:fixed;
}
#bottomNav {
background-color:#096;
z-index:999;
position:fixed;
bottom:0;
left:0;
width:100%;
_position:absolute; /* for IE6 */
_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); /* for IE6 */
overflow:visible;
}
<div id=”bottomNav”>固定漂浮物在此处O(∩_∩)O~</div>
_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);
解决方法我们为IE6添加这样一条语句:
background-image:url(text.txt);
注意这里的 text.txt 其实不需要有这个txt文档,txt的文件名叫什么看自己喜好喽,如此一来我们就解决了IE6下的缓动问题。
PS:你可能会对 text.txt 和 expression 感到郁闷,也有人使用多嵌套一层 DIV 做了个假滚动条实现了这个方法,当然这种方法在也会相应的改动下默认属性,可这种写法和之前网站融合起来很郁闷,要添加一个DIV(因为我之前没有在最外 层写DIV.wrap)。

浙公网安备 33010602011771号