css浮动5

<html>
    <head>
        <meta charset="UTF-8">
        <title>练习五</title>
        <style type="text/css">
            *{
                margin: 0px;
                padding: 0px;
            }
            .box{
                height: 60px;
                background: lightskyblue;
            }
            .box1{
                width: 1000px;
                height: 60px;
                background: #B8860B;
                margin: 0px auto;
            }
            .box-p1{
                height: 100px;
                background: lightslategray;
            }
            .box-p2{
                width: 1000px;
                height: 100px;
                background: blueviolet;
                margin: 0px auto;
        }
        .box2{
            height: 150px;
            background: cadetblue;
        }
        .box3{
            width: 50%;
            height: 150px;
            background: lime;
        }
        .w{
            height: 300px;
            background: #D2691E;
        }
        .w1{
            width: 50%;
            height: 200px;
            background: #778899;
        }
        .w2{
            width: 50%;
            height: 100px;
            background: #6495ED;
        }
        .e{
            height: 120px;
            background: #778899;
        }
        .e1{
            height: 120px;
            width: 1000px;
            background: #8A2BE2;
            margin: 0px auto;
        }
        </style>
    </head>
    <body>
        <div class="box">
            <div class="box1"></div>
        </div>
        <div class="box-p1">
            <div class="box-p2"></div>
        </div>
        <div class="box2">
            <div class="box3"></div>
        </div>
        <div class="w">
            <div class="w1"></div>
            <div class="w2"></div>
        </div>
        <div class="e">
            <div class="e1"></div>
        </div>
    </body>
</html>

 

posted @ 2019-01-24 18:51  forwardq  阅读(95)  评论(0编辑  收藏  举报