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

    介绍

    animation-direction 属性指示动画是否反向播放。

    使用示例

    语法

    animation-direction: normal
    animation-direction: reverse
    animation-direction: alternate
    animation-direction: alternate-reverse
    animation-direction: normal, reverse
    animation-direction: alternate, reverse, normal
    

    取值

    normal

    每个循环内动画向前循环,换言之,每个动画循环结束,动画重置到起点重新开始,这是默认属性。

    alternate

    动画交替反向运行,反向运行时,动画按步后退,同时,带时间功能的函数也反向,比如,ease-in 在反向时成为 ease-out。

    reverse

    反向运行动画,动画由尾到头运行。

    alternate-reverse

    动画第一次运行时是反向的,然后下一次是正向,后面依次循环。

    形式定义

    初始值normal
    适用元素all elements
    是否支持继承no
    是否支持动画no

    形式语法

    /*默认值normal*/
    animation-direction: normal | reverse | alternate | alternate-reverse;

    扩展阅读

    兼容性

    LCD tables only load in the browser

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