前端 - flex布局采用space-around这种方法,但是最后一行如何让他左对齐?
黄舟
黄舟 2017-04-17 14:55:09
0
6
1255


如图最好那两个怎么让他左对齐?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(6)
阿神

You don’t need space-around, just use flex-start. Be sure to add flex-wrap:wrap

黄舟

In this situation, I think it is better to use float layout. If you still use flex, I agree with the above statement.

伊谢尔伦

What the person above said is right, this direct percentage calculation is enough, there is no need for flex.
http://runjs.cn/code/3nq7qacp

洪涛

Then let me calculate it. Thank you

刘奇

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

黄舟

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template