Last active
August 29, 2015 13:56
-
-
Save andornagy/8860767 to your computer and use it in GitHub Desktop.
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
/* | |
* Animation configurations ( duration and fill mode ) | |
*/ | |
.animated { | |
-webkit-animation-duration: 1s; | |
animation-duration: 1s; | |
-webkit-animation-fill-mode: both; | |
animation-fill-mode: both; | |
} |
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
/* | |
* Animation for webkit | |
*/ | |
@-webkit-keyframes bounce { | |
0%, 20%, 50%, 80%, 100% {-webkit-transform: translateY(0);} | |
40% {-webkit-transform: translateY(-30px);} | |
60% {-webkit-transform: translateY(-15px);} | |
} | |
@keyframes bounce { | |
0%, 20%, 50%, 80%, 100% {transform: translateY(0);} | |
40% {transform: translateY(-30px);} | |
60% {transform: translateY(-15px);} | |
} | |
/* | |
* Adding the animation to our element | |
*/ | |
.bounce { | |
-webkit-animation-name: bounce; | |
animation-name: bounce; | |
} |
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 id="example" class="animated animation-name"></div> |
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
/* | |
* FadeIn animation | |
*/ | |
@-webkit-keyframes fadeIn { | |
0% {opacity: 0;} | |
100% {opacity: 1;} | |
} | |
@keyframes fadeIn { | |
0% {opacity: 0;} | |
100% {opacity: 1;} | |
} | |
.fadeIn { | |
-webkit-animation-name: fadeIn; | |
animation-name: fadeIn; | |
} | |
/* | |
* FadeOut animation | |
*/ | |
@-webkit-keyframes fadeOut { | |
0% {opacity: 1;} | |
100% {opacity: 0;} | |
} | |
@keyframes fadeOut{ | |
0% {opacity: 1;} | |
100% {opacity: 0;} | |
} | |
.fadeOut { | |
-webkit-animation-name: fadeOut; | |
animation-name: fadeOut; | |
} |
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
/* | |
* Flash animation | |
*/ | |
@-webkit-keyframes flash { | |
0%, 50%, 100% {opacity: 1;} | |
25%, 75% {opacity: 0;} | |
} | |
@keyframes flash { | |
0%, 50%, 100% {opacity: 1;} | |
25%, 75% {opacity: 0;} | |
} | |
.flash { | |
-webkit-animation-name: flash; | |
animation-name: flash; | |
} |
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
/* | |
* Pulse animation | |
*/ | |
@-webkit-keyframes pulse { | |
0% { -webkit-transform: scale(1); } | |
50% { -webkit-transform: scale(1.1); } | |
100% { -webkit-transform: scale(1); } | |
} | |
@keyframes pulse { | |
0% { transform: scale(1); } | |
50% { transform: scale(1.1); } | |
100% { transform: scale(1); } | |
} | |
.pulse { | |
-webkit-animation-name: pulse; | |
animation-name: pulse; | |
} |
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
/* | |
* Shake animation | |
*/ | |
@-webkit-keyframes shake { | |
0%, 100% {-webkit-transform: translateX(0);} | |
10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);} | |
20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);} | |
} | |
@keyframes shake { | |
0%, 100% {transform: translateX(0);} | |
10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);} | |
20%, 40%, 60%, 80% {transform: translateX(10px);} | |
} | |
.shake { | |
-webkit-animation-name: shake; | |
animation-name: shake; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment