<style>

body{position: absolute; min-height: 100%; width: 100%;}
content{padding-bottom:100px;} /***====padding-bottom的值为页脚的高度(若内容高度足够)====***/

footer{position: absolute; bottom: 0; width: 100%; clear: both;}  /***====若内容高度足够,则去掉定位属性====***/

</style>

 posted on 2016-11-15 13:59  刘露依  阅读(207)  评论(0编辑  收藏  举报