码迷,mamicode.com
首页 > Web开发 > 详细

CSS实现底部固定

时间:2015-09-02 10:45:30      阅读:164      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!