css-fixed兼容写法

解决IE6中fixed闪动问题(效果稍微好一点,不能完全解决闪动问题)

*{background-image:url(about:blank);background-attachment:fixed;}
body{
    background-image:url(about:blank);background-attachment:fixed;
    background-color: #fff;
}

右侧距顶部45px固定

#boxC{
    position: fixed;
    z-index: 999;
    top: 45px;
    right: 0;
    _position:absolute;
    _top:expression(documentElement.scrollTop + 45);
    overflow:hidden; 
    *zoom:1;
}

底部固定

#boxA{
    position: fixed;
    z-index: 999;
    bottom: 0px;
    left: 0px;
    _position:absolute;
    _top:expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);
    overflow:hidden; 
    *zoom:1;
}

 

posted @ 2014-09-09 11:33  史洲宇  阅读(365)  评论(0编辑  收藏  举报