首页 > 其他 > 详细

Footer固定在底部

时间:2015-04-10 09:29:39      阅读:252      评论:0      收藏:0      [点我收藏+]

这里用的是CSS Sticky Footer,支持主流浏览器(包括IE6)

html

<div class="wrapper">
<div class="push">内容</div>
</div>
<div class="footer">
<p>&copy;</p>
</div>

css

*{margin:0;}
html,body{height:100%;}
.wrapper{
min-height:100%;
height:auto !important;
height:100%; 
margin:0 auto -60px; /*这个要与footer和push的值相等*/
}
.footer,.push{
height:60px;}

Footer固定在底部

原文:http://www.cnblogs.com/ecosu/p/4413597.html

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