关于flex:解决flex布局spacebetween最后一行左对齐的方法所有行列不同情况通用

2次阅读

共计 379 个字符,预计需要花费 1 分钟才能阅读完成。

<div class=”work-list”>

  <div class="list" v-for="item in 11" :key="item" @click="$router.push('/dataList')">
   
  </div>
</div>

.work-list {

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-direction: row;
  width: 1200px;
  height: 290px;
  &:after {
    content: '';
   ** width: 332px;** //// 这个宽度为外面.listdediv 的宽度
  }
  .list {
    cursor: pointer;
    font-size: 24px;
    width: 332px;
    height: 75px;
    display: flex;
    align-items: center;
    
  }
正文完
 0