CSS笔记

Published on 2015-02-03

footer沉于页面底部的方法

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 150px;
}

.footer {
    position: absolute;
    bottom: 0;
    //以下可选
    width: 100%;
    height: 60px;
    padding-top: 20px;
    border-top: 1px solid #e2e2e2;
}