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

    介绍

    animation-iteration-count 用于设置播放动画的次数。

    使用示例

    语法

    /* 值为关键字 */
    animation-iteration-count: infinite;
    
    /* 值为数字 */
    animation-iteration-count: 3;
    
    /* 指定多个值 */
    animation-iteration-count: 2, 0, infinite;
    Info

    当 animation-iteration-count 为0时,Lynx 动画会将其视为一段持续时间为 0 的动画,并且这个动画的生命周期照常;而在标准的 CSS 动画中,会当作这个动画没有生效。这是一个和标准 CSS 动画表现不一致的地方。

    形式定义

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

    形式语法

    /*默认值1*/
    animation-iteration-count: <number> | infinite;

    扩展阅读

    兼容性

    LCD tables only load in the browser

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