CSS实现底部固定

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;}
posted @ 2015-09-02 10:22  talentzemin  阅读(218)  评论(0编辑  收藏  举报