【问题标题】:Webkit animation-iteration-count bug in ChromeChrome 中的 Webkit 动画迭代计数错误
【发布时间】:2015-03-10 04:14:55
【问题描述】:

由于某些设计灵活性的原因,在我大量调整了 CSS3 动画属性后,我一直在努力如何让我的幻灯片在 Chrome 中再次工作。经过漫长的试错过程,我发现 Webkit 中的 CSS3 animation-iteration-count 在分配一个整数值时会停止我的整个动画。 (下例中10的值就是迭代次数)

-webkit-animation: imageAnimation 48s linear 10 0s;
    -moz-animation: imageAnimation 48s linear 10 0s;
    -o-animation: imageAnimation 48s linear 10 0s;
    -ms-animation: imageAnimation 48s linear 10 0s;
    animation: imageAnimation 48s linear 10 0s; 

【问题讨论】:

    标签: javascript css animation


    【解决方案1】:

    为了解决这个问题,我通过为animation-iteration-count 分配infinite 属性来调整Webkit 行

    -webkit-animation: imageAnimation 48s linear infinite 0s;
        -moz-animation: imageAnimation 48s linear 10 0s;
        -o-animation: imageAnimation 48s linear 10 0s;
        -ms-animation: imageAnimation 48s linear 10 0s;
        animation: imageAnimation 48s linear 10 0s; 
    

    就是这样,我的幻灯片再次在 Chrome 中显示。但是在网上找不到任何链接到那个奇怪问题的错误报告。如果你们中的一些人有一些关于该 Webkit 问题的信息链接,我将不胜感激,因为对我来说不要在 Chrome 中永远循环播放幻灯片很重要。

    【讨论】:

      猜你喜欢
      • 2012-07-17
      • 1970-01-01
      • 2014-09-09
      • 2015-03-23
      • 1970-01-01
      • 2021-07-10
      • 2011-12-09
      • 1970-01-01
      • 2021-12-08
      相关资源
      最近更新 更多