How to keep wrapped flex-items the same width as the elements on the previous row?

前端 未结 13 1208
一整个雨季
一整个雨季 2020-11-29 01:24

I have a

    that is a flex-box and a bunch of
  • s in it which are the flex-items.

    I am trying to get the

13条回答
  •  没有蜡笔的小新
    2020-11-29 01:48

    I have been experimenting with your codepen and I set flex: 0 1 10%

    Of course you can set the flex-basis whatever you want, I just wanted to prove the point, that if you set flex basis and allow it to shrink, it will behave much nicer in this case.

    I think this is what you needed. Here's the preview: http://codepen.io/anon/pen/bwqNEZ

    Cheers

提交回复
热议问题