VUE(三)•iview頁面佈局之fooert浮動在底部

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body,
        html {
            height: 100%;
        }

        .box {
            min-height: 100%;
            position: relative;
        }

        header {
            width: 100%;
            height: 60px;
            background: #334455;
       }

        .section {
            padding-bottom: 110px;
            /* height:100px; */
            background: #ccc;
       }

        .footer {
            height: 50px;
            background: #333;
           position: absolute;
            bottom: 0;
            width: 100%;
        }
    </style>
</head>

<body>
    <div class="box">
        <header>
            頭部
        </header>
        <div class="section">
            正文區域
        </div>
        <div class="footer">
            底部
        </div>
    </div>
</body>

</html>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章