how to stop CSS animation without javascript


Tags: javascript,animation,css3,transition

Problem :

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 function in my actual work.



Solution :

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


    CSS Howto..

    Dilemma in deciding how to create CSS for H1, H2, H3 etc

    How do I get text side by side in HTML inside div?

    How to select classes that are not nested? CSS

    How Do I Add Colgroup Tag to ASP:Datagrid Control?

    CSS dropdown submenu with dynamic width: how to align left?

    How to add js and css files in ASP.net Core?

    CSS: How to get two DIVs side by side with automatic height, to the height of their container?

    rails redirect_to notice - how to apply css

    How can I have multiply a pixel width value with LESS Css?

    How to make header/body/footer 'popup' div with variable height body?

    How to make a centered, responsive CSS circle within a Boostrap div?

    Block grid shows horizontal scroll bar in Foundation

    How to change the opacity of elements in css?

    How to create a Horizintal menu using CSS, and showing a div for an item when the item clicked

    OS X is messing with me css, how to fix

    how to prevent form height increase on every click in Internet Explorer 9 in jqGrid

    how to trace this computed CSS value in firefox inspector?

    How to make div move to bottom of page

    How to override the color defined in css?

    How to set border's thickness in percentages?

    How to change the Menu colour when selected?

    How to check “IF any one or all buttons are clicked” in jquery

    CSS HTML how to remove whole cell links in tables?

    Html, CSS - How to create a donut chart like this?

    How to scale down CSS background-image when using various background-positions?

    Using Jquery to show and hide elements based on an input

    How do I resize an element rotated in CSS to fit the new area in IE9?

    CKEditor issue: How to apply custom css to CKEditor [closed]

    how to position images in even positions

    how to create a table layout with float in css