I am using CSS3 animation and I want me to be able to go to a specific place in the animation. For example, if CSS looks like this (and pretend I used all the appropriate prefixes):
@keyframes fade_in_out_anim { 0% { opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } } #fade_in_out { animation: fade_in_out_anim 5s; }
then I would like to stop the animation and transfer it by 50%. My guess is that perfect JavaScript would look something like this:
var style = document.getElementById('fade_in_out').style; style.animationPlayState = 'paused';
Does anyone know how to do this (hopefully in Webkit)?
source share