黑妞与白胖
愿得一人心,白首不相离!

CSS样式部分

body {
background-image:url(text.txt); /* for IE6 */
background-attachment:fixed;
}
#bottomNav {
background-color:#096;
z-index:999;
position:fixed;
bottom:0;
left:0;

_position:absolute; /* for IE6 */
_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); /* for IE6 */
overflow:visible;
}

HTML部分加上这个id为 #bottomNav 的DIV即可:

<div id=”bottomNav”>固定漂浮物在此处O(∩_∩)O~</div>

再看看这些需要注意的地方:

_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);

看到 _top 大家都知道是为IE6独家准备的,但是当我只加了上面这句时,IE6下拉动滚动条看到的这个漂浮物是抖动的-_-|||
解决方法我们为IE6添加这样一条语句:

background-image:url(text.txt);

 

注意这里的 text.txt 其实不需要有这个txt文档,txt的文件名叫什么看自己喜好喽,如此一来我们就解决了IE6下的缓动问题。

posted on 2012-02-14 10:08  慢阳阳  阅读(827)  评论(0编辑  收藏  举报