For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/css/properties/min-height.md.
Lynx
  • 简体中文
  • min-height

    介绍

    设置元件的最小高度。它可以阻止 height 属性的应用值小于 min-height 的值。 min-height 的值会覆盖 height,但是会被 max-height 覆盖。

    使用示例

    语法

    /* <length> */
    min-height: 120px;
    min-height: 10em;
    
    /* <percentage> */
    min-height: 75%;

    取值

    0px

    默认值

    <length>

    <length> 定义了一个确定值。

    <percentage>

    定义 min-height 为一个相对于父容器高度的百分数。

    形式定义

    初始值0px
    适用元素所有元件
    是否支持继承
    是否支持动画yes
    百分比The percentage is calculated with respect to the height of the generated box's containing block

    形式语法

    min-height = <length-percentage [0,∞]>
    
    <length-percentage> =
      <length>      |
      <percentage>

    与 Web 的区别

    mdn: min-height

    1. 不支持 auto,默认值是 0px
    2. 不支持 nonemax-contentmin-contentfit-content
    3. 在 Lynx 中 min-height 不会覆盖 max-height
    4. 在 Lynx 中,如果指定的 max-height 小于 min-height,则 min-height 会被忽略。

    兼容性

    LCD tables only load in the browser

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。