HTML双列布局-钻芒博客

源码

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title></title>
        <style>
            header{
                width: 100%;
                height: 80px;   
                background-color: #f0ad4e;
            }
            .main{
                width: 100%;
                height: 800px;
                overflow: hidden;
            }
            .main-left,.main-right{
                float: left;
                width: 50%;
                height: 800px;
            }
            .main-left{
                background-color: #31b0d5;
                border: 100px;
                
            }
            .main-right{
                background-color: #5cb85c;
            }
            footer{
                width: 100%;
                height: 80px;
                background-color: #337ab7;
            }
        </style>
    </head>
    <body>
        <header></header>
        <div class="main">
            <div class="main-left"></div>
            <div class="main-right"></div>
        </div>
        <footer></footer>
    </body>
</html>

原文链接: 简书 https://www.jianshu.com/p/1040d74d7af8