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

后端 未结 4 1924
南笙
南笙 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:27

    In a few words width: fit-content; means :

    "Use the space you can (available) but never less than your min-content and never more than your max-content"

提交回复
热议问题