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

    介绍

    用于设置相对布局中同级元件的编号。-10 是特殊值。-1 是默认值,代表当前元件不会被视为同级元件的对齐参考标准。不能使用 0 作为元件的 id,否则有不符合预期的表现。

    使用示例

    语法

    relative-id: 1;
    relative-id: 2;

    取值

    • <number>

      int 值。表示当前元件的编号。默认值-1-10 是特殊值。-1 是默认值,代表当前元件不会被视为同级元件的对齐参考标准。不能使用 0 作为元件的 id,否则有不符合预期的表现。

    形式定义

    初始值-1
    适用元素relative items
    是否支持继承
    是否支持动画

    形式语法

    relative-id = <integer [1,∞]>

    与 Web 的区别

    • Web 无此属性。

    兼容性

    LCD tables only load in the browser

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