指定了一个元件的高度。
默认情况下,这个属性决定的是边框区域(border area)的高度,但如果将该元件的 box-sizing
设置为 content-box
,就转而设置内容区域(content area)的高度。
min-height
和 max-height
属性的优先级高于 height
。
auto
默认值。lynx
根据一些条件决定具体值。
<length>
<length>
将高度定义为一个绝对值。
<percentage>
包含块高度的百分比 <percentage>
。
max-content
元件内容固有的(intrinsic)合适高度。
fit-content
在内容最大高度及 fit-content
定义值中取最小值。
初始值 | auto |
适用元素 | 所有元件 |
是否支持继承 | 否 |
是否支持动画 | yes |
百分比 | The percentage is calculated with respect to the height of the generated box's containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to auto. A percentage height on the root element is relative to the initial containing block |
height
默认决定的是边框区域(border area)的高度,而 Web 是 content area
;min-content
;LCD tables only load in the browser