flex布局第一行div左对齐,第二行中对齐,第三行右对齐

.flex{
   

      display:flex;

      flex-direction:column;

      width:600px;

  }

.flex div{
   

      width:100px;

      height:100px;

      background:red;

      margin-left:2px;

  }

.flex div:nth-of-type(1){
   

      align-self:flex-start;

  }

.flex div:nth-of-type(2){
   

     align-self:center;

  }

.flex div:nth-of-type(3){
   

     align-self:flex-end;

  }

 

转载于:https://www.cnblogs.com/chenchenhao/p/9889960.html

    原文作者:weixin_30300523
    原文地址: https://blog.csdn.net/weixin_30300523/article/details/98723610
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞