flex布局中设置了justify-content: space-between;元素会两端对齐,导致最后一行缺省时,item元素会两端对齐

缺省元素导致两端对齐,非常的难看,要变成下面的布局怎么弄呢?无论缺省多少个,最后一行都是左对齐

&:after{
content: ""; width: 32%; display: block; height:0; width:31%;
/*只需要添加父元素的after伪元素中 高度0 ,宽度与item的宽一样*/
}
无论多少个,都可以自适应

网友评论