This is the jsFiddle. What I would like is stop the box when it reaches its end position. I know there is a transition function available also but that does not seem to work. Are all animation functions type also available for transition? I am using rotate funct开发者_如何转开发ion in my actual work.
Just set animation-iteration-count
to 1. A value of infinite
causes the animation to be repeated infinitely. And remember to style the object the way it should be AFTER the animation (top: 200px;
).
I've updated the fiddle: http://jsfiddle.net/nTG42/2/
More information is provide by the MDN: https://developer.mozilla.org/en/css/css_animations
Remove the infinite from animation:mymove infinite;
and set the final place as top:200px. Demo
精彩评论