Prev Demo
CSS3
>
Keyframes Animation
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title></title> <style> h1 { /* for chrome and safari*/ -webkit-animation-duration: 1s; -webkit-animation-name: slidein; /*for firefox*/ -moz-animation-duration: 1s; -moz-animation-name: slidein; /* for opera*/ -o-animation-duration: 1s; -o-animation-name: slidein; /* Standard syntax*/ animation-duration: 1s; animation-name: slidein; } @-webkit-keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } @-moz-keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } @-o-keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } @keyframes slidein { from { margin-left: 100%; width: 300%; } to { margin-left: 0%; width: 100%; } } </style> </head> <body> <h1>TechFunda</h1> <button onclick="myFunction()">Click here to load</button> <script> function myFunction() { location.reload(); } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output