设置元件的最大高度。它可以阻止 height
属性的应用值大于 max-height
的值。
max-height
的值会覆盖 height
和 min-height
。
<length>
<length>
定义了一个确定值。
<percentage>
定义作为包含区块高度百分比的 max-height
。
初始值 | 盒子高度没有限制 |
适用元素 | 所有元件 |
是否支持继承 | 否 |
是否支持动画 | yes |
百分比 | The percentage is calculated with respect to the height of the generated box's containing block |
none
,max-content
,min-content
,fit-content
。max-height
会覆盖 min-height
。LCD tables only load in the browser