Prev Demo
Animation Fill Mode
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title></title> <style> div { width: 100px; height: 100px; background: red; position: relative; /* for chrome and safari*/ -webkit-animation: function 1s; -webkit-animation-iteration-count: 5; -webkit-animation-fill-mode: forwards; /* for firefox*/ -moz-animation: function 1s; -moz-animation-iteration-count: 5; -moz-animation-fill-mode: forwards; /* for opera*/ -o-animation: function 1s; -o-animation-iteration-count: 5; -o-animation-fill-mode: forwards; /* Standard syntax*/ animation:function 1s; animation-iteration-count:5; animation-fill-mode:forwards; } @-webkit-keyframes function { from { top: 0px; } to { top: 200px; } } @-moz-keyframes function { from { top: 0px; } to { top: 200px; } } @-o-keyframes function { from { top: 0px; } to { top: 200px; } } @keyframes function { from { top: 0px; } to { top: 200px; } } </style> </head> <body> <p>Animation fill mode</p> <div></div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output