阿神2017-04-17 14:57:09
You don’t need space-around, just use flex-start. Be sure to add flex-wrap:wrap
黄舟2017-04-17 14:57:09
In this situation, I think it is better to use float layout. If you still use flex, I agree with the above statement.
伊谢尔伦2017-04-17 14:57:09
What the person above said is right, this direct percentage calculation is enough, there is no need for flex.
http://runjs.cn/code/3nq7qacp
怪我咯2017-04-17 14:57:09
If the width of each item is the same, you can add a few blank placeholder items and keep the number of columns in each row the same
黄舟2017-04-17 14:57:09
flex is used with percentages.
If justify-content: space-around;
, you need to add a blank placeholder element.
If justify-content: flex-start;
, no additional elements are needed.
item internal text-align: center;
implements centering.