如何设置一个层始终在页面底部

来源:luqidong 发布时间:2014-03-27 20:05:54 点击数:

 

设置一个层div的class为warpper。然后包含你的任何底部信息然后这样写:

 

* {
    margin: 0;
}
html, body {
    height: 100%;
}
.wrapper {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
    height: 142px; /* .push must be the same height as .footer */
}

 

本文由免费oa系统78oa原创,转载请注明出处。