首页 > Web开发 > 详细

CSS实现底部固定

时间:2015-09-02 10:42:34      阅读:311      评论:0      收藏:0      [点我收藏+]
html代码结构
1 <body>
2     <div class="wrap">
3         <div class="head"></div>
4         <div class="main"></div>
5         <div class="foot"></div>
6     </div>
7 </body>
CSS代码:
1 html, body { height: 100%; } 
2 .wrap { min-height: 100%; height: auto !important; height: 100%;position: relative; } 
3 .main { padding-bottom: 100px; } 
4 .foot { position: absolute; bottom: 0; width: 100%; height: 100px;}

CSS实现底部固定

原文:http://www.cnblogs.com/talentzemin/p/4777825.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!