css方法实现div固定浏览器底端
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>
本文来自博客园,作者:tinyphp,转载请注明原文链接:https://www.cnblogs.com/tinyphp/p/3159353.html
向着星辰与深渊,博客园加油

浙公网安备 33010602011771号