I'm trying to animate an element rotating like someone starting a top. At first, the element would rotate counter-clockwise before transitioning to rotating clockwise infinitely.
The general CSS I have is here:
div {
animation:
PreRotate 800ms ease-out 0ms 1,
Rotate 500ms linear infinite 800ms;
}
@-keyframes PreRotate {
from { transform:rotate(0deg);}
to { transform:rotate(-360deg);}
}
@-keyframes Rotate {
from { transform:rotate(0deg);}
to { transform:rotate(360deg);}
}
What I expect would happen is that the element would rotate counter clockwise for 800ms once (PreRotate animation) and then rotate clockwise infinitely after 800ms (Rotate animation). From the example http://jsfiddle.net/Fu5V2/6/ though, it seems like every clockwise rotation, the rotation 'hiccups'.
Could someone explain why this is happening and how the desired effect could be achieved? The independent animations seem right but chaining them together messes something up.