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/order.md.
Lynx
  • 简体中文
  • order

    介绍

    order 属性规定了容器中的子元件在布局时的顺序。元件按照 order 属性的值的增序进行布局。拥有相同 order 属性值的元件按照它们在源代码中出现的顺序进行布局。

    使用示例

    语法

    /* Numerical value including negative numbers */
    order: 5;
    order: -5;

    取值

    • <number>

    <number> 表示子元件所在的次序组。默认值0

    形式定义

    初始值0
    适用元素所有非position: absolute/fixed/sticky孩子元件
    是否支持继承
    是否支持动画no

    与 Web 的区别

    1. 不支持在 position: absolute/fixed/sticky flex and grid container children 上使用。
    2. Lynx 中 order 的使用不会影响元件的渲染顺序,而 Web 会。

    兼容性

    LCD tables only load in the browser

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