zoukankan      html  css  js  c++  java
  • div等高布局

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title>实际是将其转为table</title>
            <link rel="stylesheet" href="plugins/bootstrap/css/bootstrap.min.css" />
            <style>
                .div{
                    border: 1px solid saddlebrown;
                    border-spacing: 15px;
                    width: 30%;
                    display: table;
                }
                .div1{
                    display: table-cell;
                    width: 100px;
                    height:150px;
                    background-color: royalblue;
                    vertical-align: middle;
                }
                .div2{
                    display: table-cell;
                    border: 1px solid seagreen;
                    padding:10px;
                }
            </style>
        </head>
        <body>
            <div class="div">
                <div class="div1"></div>
                <div class="div2">
                    发舒服舒服舒服舒服水电费
                    发舒服舒服舒服舒服水电费
                    发舒服舒服舒服舒服水电费
                    发舒服舒服舒服舒服水电费
                    发舒服舒服舒服舒服水电费
                    发舒服舒服舒服舒服水电费
                </div>
            </div>
        </body>
    </html>
  • 相关阅读:
    day20
    day19
    day18
    day17
    day16
    day14 HTML
    day7课程
    day6
    python-day4
    python-day3
  • 原文地址:https://www.cnblogs.com/littleboyck/p/11511594.html
Copyright © 2011-2022 走看看