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;

  }

 

posted @ 2018-11-01 16:24  ①丶①۵  阅读(2607)  评论(0编辑  收藏  举报