-
[color=green][b]max-height[/b][/color]
The value of the max-height property overrides height.
[color=green][b]min-height[/b][/color]
The value of the min-height property overrides both max-height and height.
[color=brown]Default value:[/color] 0
[color=brown]Inherited:[/color] no
[color=brown]Version:[/color] CSS2
[color=brown]JavaScript syntax:[/color] object.style.minHeight="10px"
[b]Example:[/b]
p
{
min-height:100px;
}
==
[color=green][b]max-height[/b][/color]
The value of the max-height property overrides height.
[color=green][b]min-height[/b][/color]
The value of the min-height property overrides both max-height and height.
[color=brown]Default value:[/color] 0
[color=brown]Inherited:[/color] no
[color=brown]Version:[/color] CSS2
[color=brown]JavaScript syntax:[/color] object.style.minHeight="10px"
[b]Example:[/b]
p
{
min-height:100px;
}
==
本文详细介绍了CSS中max-height和min-height属性的使用方法及其优先级。min-height属性的值会覆盖max-height和height属性的值。默认值为0,不继承,并提供了设置min-height属性的JavaScript语法示例。
1万+

被折叠的 条评论
为什么被折叠?



