A Pen by Captain Anonymous on CodePen.
Created
July 11, 2015 20:20
-
-
Save dileshni/092d5f2262a30d5f9916 to your computer and use it in GitHub Desktop.
NqMWbq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="box_animation"></div> | |
<p>This box will animate for 4 seconds and go back to the original color.</p> | |
<p><strong>Remember: animation-duration property is required for this to work</strong></p> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.box_animation { | |
width: 100px; | |
height: 100px; | |
background-color: red; | |
-webkit-animation-name: example; /* Chrome, Safari, Opera */ | |
-webkit-animation-duration: 4s; /* Chrome, Safari, Opera */ | |
animation-name: example; | |
animation-duration: 4s; | |
} | |
/* Chrome, Safari, Opera */ | |
@-webkit-keyframes example { | |
from {background-color: red;} | |
to {background-color: yellow;} | |
} | |
/* Standard syntax */ | |
@keyframes example { | |
from {background-color: red;} | |
to {background-color: yellow;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment