Skip to content Skip to sidebar Skip to footer

Css Animation Not Working In Chrome

Some insight into the project: A full interactive website, where animations will play.. then they'll stop, once they've stopped and a mouseover event on an animation occurs it will

Solution 1:

Firstly: Your jQuery has a mistake in it. Change the -webkit-animation-iteration-count from 0.9 to 0.7. Also, please take a look at: http://caniuse.com/#search=animation. You can see, that you have to use the prefix "-webkit" for google chrome. That is why, you need to define both of it in your img style tag. Like so:

<img src="3ds_preset_gearshape.png"class="gwd-img-r1sa gwd-gen-hlergwdanimation" data-gwd-style="" data-gwd-override-style="" style="animation-iteration-count: 0.1;-webkit-animation-iteration-count: 0.1;">

A better way to do this, would be to define the iteration count in your stylesheet, not in the html. If you need different iteration counts for different img's, then this is not a good solution for you, ofcourse. Otherwise change:

3s linear 0s1normal forwards 

to

3s linear 0s0.1normal forwards

And leave the style in the img tags blank

For the stop and play part of your question:

jsfiddle.net/Lvq6ee8d/14/

For explanation: You know that your animation runs 3 seconds, so I have set a timeout function, which starts when the event "animationstart" is being triggered. Then after 300ms(3000ms/100*10 = 300ms) the animationplaystate is set to pause. So after 10%, the animation stops. And on hover, the animation continues. Also keep in mind, that in this example we need to change the css a little bit. We set the animation iteration to the desired amount, where we want the animation to be when it's finished(1 in my example), so we can use pause and running on it.

Post a Comment for "Css Animation Not Working In Chrome"