gpt4 book ai didi

css - 如何在 CSS 动画的不同关键帧上启动不同的元素

转载 作者:行者123 更新时间:2023-12-02 05:13:52 24 4
gpt4 key购买 nike

如果我有一个 CSS 动画,我想创建该动画的多个实例,但从动画的不同阶段开始,我该如何指定。

我想象的是这样的,第二行webkit是伪代码:

 #cell1
{
width:100px;
height:100px;

-webkit-animation: pulse 35s infinite alternate;
-webkit-animation: pulse start at 25%;
}

最佳答案

据我了解规范,animation-delay 的负值可以解决问题:

http://www.w3.org/TR/css3-animations/#animation-delay

If the value for 'animation-delay' is a negative time offset then the animation will execute the moment it is applied, but will appear to have begun execution at the specified offset. That is, the animation will appear to begin part-way through its play cycle. In the case where an animation has implied starting values and a negative 'animation-delay', the starting values are taken from the moment the animation is applied.

编辑:确实,这适用于我的 Chrome :http://jsfiddle.net/GvUzX/

关于css - 如何在 CSS 动画的不同关键帧上启动不同的元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14954630/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com