简体中文
CSS 属性 min-height 能够设置元素的最小高度。这样能够防止 height 属性的应用值小于 min-height 的值。
Android | iOS | web |
---|---|---|
3.9 | 4.11 | 4.0 |
min-height: <viewport-length>;
fit-content
元素的高度将自动调整为适应内容的大小,但不会小于内容的最小高度 min-content
值。
max-content
元素的最小高度不会小于内容的最大高度。
min-content
元素的最小高度不会小于内容的最小高度。
auto
浏览器将通过计算为指定元素选择一个 min-height 值。
none
不限制盒容器的尺寸。
平台 | 默认值 |
---|---|
uvue | 0px |
注意:W3C 默认值为:auto
Android | iOS | web | |
---|---|---|---|
fit-content | x | x | 4.0 |
max-content | x | x | 4.0 |
min-content | x | x | 4.0 |
auto | x | x | 4.0 |
none | x | x | 4.0 |
Chrome | Edge | Firefox | Opera | Safari | IE | |
---|---|---|---|---|---|---|
min-height | √( 1 ) | √( 12 ) | √( 3 ) | √( 4 ) | √( 1.3 ) | √( 7 ) |
fit-content | √( 1 ) | √( 12 ) | √( 3 ) | √( 4 ) | √( 1.3 ) | √( 7 ) |
max-content | √( 1 ) | √( 12 ) | √( 3 ) | √( 4 ) | √( 1.3 ) | √( 7 ) |
min-content | √( 1 ) | √( 12 ) | √( 3 ) | √( 4 ) | √( 1.3 ) | √( 7 ) |
auto | √( 1 ) | √( 12 ) | √( 3 ) | √( 4 ) | √( 1.3 ) | √( 7 ) |
在App端为了优化文字排版性能,不支持 auto、none、max-content、min-content、fit-content,默认值为0px。
默认值为 auto,通过计算选择一个 min-height 值。