flex-wrap not working as expected in Safari

后端 未结 8 2030
有刺的猬
有刺的猬 2020-12-24 10:21

On the homepage of http://www.shopifyexperte.de/ there are two flex-box modules, one under \"Kundenstimmen\" and one under \"Neueste Beiträge...\". The inner boxes are suppo

8条回答
  •  抹茶落季
    2020-12-24 11:21

    This is indeed a Safari bug. The details are available at the excellent flexbugs page, but to quote it:

    Safari uses min/max width/height declarations for actually rendering the size of flex items, but it ignores those values when calculating how many items should be on a single line of a multi-line flex container. Instead, it simply uses the item's flex-basis value, or its width if the flex basis is set to auto.

    So the fix / workaround - as suggested by other answers here - is to set the flex-basis to an explicit width rather than auto.

提交回复
热议问题