What is the difference between CSS fit-content and max-content?

后端 未结 4 1864
南笙
南笙 2021-01-30 10:49

I\'m following this article https://css-tricks.com/almanac/properties/w/width/ to try to understand how this rules work.

I have this example:

4条回答
  •  梦如初夏
    2021-01-30 11:16

    fit-content uses max-content, unless available < max-content, then it uses available. Unless available < min-content, then it uses min-content.

提交回复
热议问题