css浮动2

    <head>
        <meta charset="UTF-8">
        <title>练习二</title>
        <style type="text/css">
            .box{
                width: 1210px;
                height: 100%;
                border: 1px transparent solid;
                margin: 0px auto;
                overflow: hidden;
            }
            .box1{
                width: 290px;
                height: 390px;
                border: 1px transparent solid;
                text-align: 10px;
                float: left;
            }    
            .box1:hover{
                border: 1px #6495ED solid;
            }
            .box1 img {
                padding: 20px;
            }
            .box3{
                margin-left: 15px;
            }
            .box6{
                margin-left: 35px;
            }
        </style>
    </head>
    <body>
        <div class="box">
            <div class="box1">
                <img src="img/show1.png"/>
                <p class="box3"><b>昌平区域北街道</b></p>
                <p class="box6">昌平区东关十字路口东北侧</p>
            </div>
            <div class="box1">
                <img src="img/show1.png"/>
                <p class="box3"><b>昌平区域北街道</b></p>
                <p class="box6">昌平区东关十字路口东北侧</p>
            </div>
            <div class="box1">
                <img src="img/show1.png"/>
                <p class="box3"><b>昌平区域北街道</b></p>
                <p class="box6">昌平区东关十字路口东北侧</p>
            </div>
            <div class="box1">
                <img src="img/show1.png"/>
                <p class="box3"><b>昌平区域北街道</b></p>
                <p class="box6">昌平区东关十字路口东北侧</p>
            </div>
        </div>
    </body>
</html>

 

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