css浮动3

head>
        <meta charset="UTF-8">
        <title>练习三</title>
        <style type="text/css">
            * {
                margin: 0px;
                padding: 0px;
            }
            .p {
                width: 761px;
                margin: 0px auto;
                font-size: 0px;
                margin-top: 100px;
            }
            .box11 {
                width: 200px;
                height: 200px;
                background-image: url(img/360截图162106079010495.png);
                border: 1px #87CEFA solid;
                display: inline-block;
                margin-right: 10px;
            }
            .box2 {
                width: 200px;
                height: 50px;
                background:rgba(78,102,106,0.5);
                font-size: 20px;
                color: lightcyan;
                margin-top: 140px;
                text-align: center;
                padding-top: 18px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                
            }
        </style>
    </head>
    <body>
        <div class="p">
            <div class="box11">
                <div class="box2">建业喜号城邦建业喜号城邦建业喜号城邦建业喜号城邦</div>
            </div>
            <div class="box11">
                <div class="box2">建业喜号城邦</div>
            </div>
            <div class="box11">
                <div class="box2">建业喜号城邦</div>
            </div>
        </div>
    </body>

</html>

 

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