fsg6

 

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <style>
      html,
      body {
        margin: 0;
        padding: 0;
      }
      .outer {
        width: 50px;
        height: 200px;
        border: 1px solid pink;
      }

      .item {
        height: 100px;
        border: 1px solid red;
        display: flex;
        /* 侧轴对齐方式 */
        align-items: center;
      }
    </style>
  </head>
  <body>
    <div class="outer">
      <div class="item">多行居中效果</div>
      <div class="item">多行居中效果111</div>
    </div>
  </body>
</html>

 

效果

 

分类:

技术点:

相关文章:

  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-10-19
  • 2022-02-24
  • 2021-05-26
  • 2021-10-15
猜你喜欢
  • 2021-12-04
  • 2021-08-14
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-12-15
  • 2021-12-01
相关资源
相似解决方案