
(转)CSS width fit
1.width: fit-content
根据内容自适应宽度 可以结合margin-auto 来实现居中
2.width: min-content
使用子元素中宽度最小的。(无论子元素是inline,还是 block,都会使用最小的宽度)
3.width:max-content
使用子元素中最大的。无论是inline还是block
链接:with fit-content 等属性详解 - 菜鸟木易 - 博客园
👁️ 阅读量:0
© 版权声明:本文《(转)CSS width fit》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686973869a412068.html。