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>

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM