Prevent flex items from overflowing a container

前端 未结 7 1842
说谎
说谎 2021-01-30 05:13

How do I make my flex item (article in this example), which has flex-grow: 1; not to overflow it\'s flex parent/container (main<

7条回答
  •  轮回少年
    2021-01-30 05:41

    It's not suitable for every situation, because not all items can have a non-proportional maximum, but slapping a good ol' max-width on the offending element/container can put it back in line.

提交回复
热议问题