Equal height rows in a flex container

前端 未结 9 707
梦如初夏
梦如初夏 2020-11-22 09:28

As you can see, the list-items in the first row have same height. But items in the second row have different height

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 10:06

    If you know the items you are mapping through, you can accomplish this by doing one row at a time. I know it's a workaround, but it works.

    For me I had 4 items per row, so I broke it up into two rows of 4 with each row height: 50%, get rid of flex-grow, have and in a

    with flex-column. This will do the trick

提交回复
热议问题