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

    介绍

    direction 属性设置文字、元件的布局方向。例如 ltr 表示从左向右 (类似中文等),rtl 表示从右向左 (类似阿拉伯语等)。

    使用示例

    语法

    direction: normal;
    direction: ltr;
    direction: rtl;
    direction: lynx-rtl;

    取值

    • normal

      默认值。与 ltr 表现一致,是兼容产物。

    • ltr

      文字从左向右排列,水平方向的逻辑属性 start 映射到 leftend 映射到 right

    • rtl

      文字从右向左排列,水平方向的逻辑属性 start 映射到 rightend 映射到 left

    • lynx-rtl deprecated

      lynx 兼容属性,文字从右向左排列,水平方向的属性 left 映射到 rightright 映射到 left

    形式定义

    初始值normal
    适用元素所有元件
    是否支持继承
    是否支持动画

    形式语法

    direction = normal | ltr | rtl

    与 Web 的区别

    • 引入 normallynx-rtl 等兼容属性,用来提高 lynx 易用性。

    兼容性

    LCD tables only load in the browser

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