您的位置:首页 > Web前端 > CSS

css方法实现div固定浏览器底端

2013-07-02 17:31 435 查看
CSS:

body{ margin:0; padding:0;background-image:url(text.txt);/*for IE6 防抖,也可以用一张图片URL*/
background-attachment:fixed;} /*是否存在这文件无所谓,要fixed,不能用scroll */
.main{ height:1800px;}
.footer{ color:red; left:0;background:#ccc; height:30px; position:fixed; bottom:0; z-index:999;  overflow:visible;
/* for IE6 */
_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);
_position:absolute;
/* for IE6 */}


body:

<div class="main">这是内容层</div>
<div class="footer">我在底部</div>


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: