zoukankan      html  css  js  c++  java
  • [CSS] Change the off-axis Alignment of a Flexed Container with `align-items`

    We changed the axis layout with 'justify-content', and the "off axis" layout is controlled by 'align-items'. The most common values are flex-startflex-end, or center.

    body {
      display: flex;
      flex-direction: row;
    }
    
    .container {
      background-color: #ebb871;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    
      align-items: flex-start;
      align-items: flex-end;
      align-items: center
    }
    <body>
        <div class="container">
            <div class="box1 red"></div>
            <div class="box2 green"></div>
            <div class="box3 blue"></div>
        </div>
    </body>

  • 相关阅读:
    10-3 集合之Set
    【Angular】排序
    【Mongous】
    【验证码】
    爬虫
    【DOM】
    年月日
    【Mocha】
    【Test】
    洛谷——P1823 音乐会的等待
  • 原文地址:https://www.cnblogs.com/Answer1215/p/11527325.html
Copyright © 2011-2022 走看看