How to wrap text around objects (like floating does) in flexbox?

前端 未结 1 1999
温柔的废话
温柔的废话 2020-12-19 03:42

Let\'s say I have a display: inline container with some text children, and some inline-block children:

If I give the container the

相关标签:
1条回答
  • 2020-12-19 03:43

    Once you create a flex container (display: flex or display: inline-flex), all in-flow children become flex items.

    Flex items are, by definition, "blockified", which means they are block-level boxes (source).

    Text elements represent inline-level boxes (source).

    Therefore, you cannot make flex items wrap in the same way as text (or floats).

    0 讨论(0)
提交回复
热议问题