JAVASCRIPT
VUE
REACT
NODE
ES6
TYPESCRIPT

页面布局多行居中

2022. 11. 04    

页面布局-多行居中

多行居中

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /*第一*/
    .d {
      display: table-cell;
      width: 400px;
      height: 200px;
      border: 1px solid red;
      vertical-align: middle;
    }

    /*第二*/
    .d1 {
      width: 400px;
      height: 200px;
      border: 1px solid red;
      line-height: 200px;
    }

    .d1 span {
      display: inline-block;
      vertical-align: middle;
      line-height: 20px;
    }

    /*第三*/
    .dd {
      display: table;
      width: 400px;
      height: 200px;
      border: 1px solid red;
    }

    .dd span {
      display: table-cell;
      vertical-align: middle;
    }
  </style>
</head>

<body>
  <!--第一-->
  <div class="d">
    斯柯达撒开口道上看看萨克多少啊看萨克代收款‘卡开始看开始看的卡卡卡卡萨克skakskuaidi100.co看的卡卡卡卡萨克skakskuaidi100.co看的卡卡卡卡萨克skakskuaidi100.co看的卡卡卡卡萨克skakskuaidi100.com
  </div>
  <!--第二-->
  <div class="d1">
    <span>
      看电视看看萨克卡卡看电视看看的’澳康达‘卡卡卡的酷爱快斯柯达卡卡代收款卡的卡仕达看刷卡开始卡仕达看萨克打开时卡卡打开石达开临时卡卡里开始看
    </span>
  </div>
  <!--第三-->
  <div class="dd">
    <span>阿卡卡的卡萨看看开第三卡卡萨克看的 dsa 大大多少是家具开第三卡卡萨克看的 dsa 大大多少是家具店看撒娇倒计时</span>
  </div>
</body>

</html>