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

    介绍

    offset-rotate CSS 属性指定元件沿 offset-path 定义的路径定位时的方向。

    可以将 offset-rotateoffset-pathoffset-distance 配合使用,控制元件在路径上运动时是跟随路径切线方向旋转,还是保持固定旋转角度。

    使用示例

    语法

    offset-rotate: auto;
    offset-rotate: 0deg;
    offset-rotate: 90deg;
    offset-rotate: 360deg;

    取值

    • auto

      元件会根据当前路径位置方向与正 x 轴方向之间的角度旋转。这是默认值。

    • <angle>

      元件在路径上始终保持指定的顺时针旋转角度。如果不希望元件跟随路径旋转,可以使用 0deg

    Info

    Lynx 目前支持 auto0deg360deg 范围内的 <angle> 取值。

    形式定义

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

    形式语法

    offset-rotate = auto | <angle>

    与 Web 的区别

    1. Lynx 不支持 auto <angle>。在 Web 上,该语法会将指定角度叠加到自动计算的路径方向上。
    2. Lynx 不支持 reverse。在 Web 上,reverse 等价于 auto 180deg

    兼容性

    LCD tables only load in the browser

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