摘要:
1.若height是确定的(比如height:100px),则height直接可确定(还受min-height,max-height影响,见height,min-height,max-heigth的作用机制问答)。 2.若width是不确定的(比如width: min-content 或 width
阅读全文
posted @ 2021-04-25 11:15
chen8840
阅读(874)
推荐(0)
编辑
摘要:
fill-available:宽度由外部元素决定(div)min-content:宽度由内部元素宽度缩小到最小的最大内部元素宽度决定max-content:宽度由内部元素宽度扩大到最大后的最大内部元素宽度决定fit-content:(inline-block) 先取max-content和min-c
阅读全文
posted @ 2021-04-25 09:22
chen8840
阅读(80)
推荐(0)
编辑
摘要:
1.min-height和height同时存在,子元素高度100%,以哪个高度为准? 答:min-height 2.height存在,子元素高度100%,子元素内容高度大于100%,子元素高度为多少? 答:高度为父元素高度100% 3.min-height 和 height 同时存在且相等,子元素高
阅读全文
posted @ 2021-04-25 09:15
chen8840
阅读(260)
推荐(0)
编辑