Created
June 25, 2013 20:06
-
-
Save smokinjoe/5861897 to your computer and use it in GitHub Desktop.
Simple way to create a 'bounce' effect with css's keyframes
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
.myBounceDiv { | |
-moz-animation:bounce .40s linear; | |
-webkit-animation:bounce .40s linear; | |
} | |
@-moz-keyframes bounce { | |
0%{ -moz-transform:scale(0); opacity:0;} | |
50%{ -moz-transform:scale(1.3); opacity:0.4; } | |
75%{ -moz-transform:scale(0.9); opacity:0.7;} | |
100%{ -moz-transform:scale(1); opacity:1;} | |
} | |
@-webkit-keyframes bounce { | |
0%{ -webkit-transform:scale(0); opacity:0;} | |
50%{ -webkit-transform:scale(1.3); opacity:0.4;} | |
75%{ -webkit-transform:scale(0.9); opacity:0.7;} | |
100%{ -webkit-transform:scale(1); opacity:1;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment