页面尾部固定在底部

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        html, body{
            height: 100%;
            padding: 0;
            margin: 0;
        }
        body {
            position: relative;
            height: auto;
            min-height: 100%;
            box-sizing: border-box;
            padding-bottom: 100px;
        }
        .footer{
            width: 100%;
            height: 100px;
            background: #000000;
            position: absolute;
            bottom: 0;
        }
    </style>
</head>
<body>
    <div class="footer"></div>
</body>
</html>

 

posted @ 2015-12-17 16:25  HeiYe168  阅读(322)  评论(0编辑  收藏  举报