Created
January 9, 2013 12:23
-
-
Save krasimir/4492738 to your computer and use it in GitHub Desktop.
CSS blink animation
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
@keyframes blink { | |
0% { opacity: 1; } | |
12% { opacity: 0.75; } | |
24% { opacity: 0.5; } | |
36% { opacity: 0.25; } | |
48% { opacity: 0; } | |
60% { opacity: 0.25; } | |
72% { opacity: 0.5; } | |
84% { opacity: 0.75; } | |
100% { opacity: 1; } | |
} | |
@-moz-keyframes blink { | |
0% { opacity: 1; } | |
12% { opacity: 0.75; } | |
24% { opacity: 0.5; } | |
36% { opacity: 0.25; } | |
48% { opacity: 0; } | |
60% { opacity: 0.25; } | |
72% { opacity: 0.5; } | |
84% { opacity: 0.75; } | |
100% { opacity: 1; } | |
} | |
@-webkit-keyframes blink { | |
0% { opacity: 1; } | |
12% { opacity: 0.75; } | |
24% { opacity: 0.5; } | |
36% { opacity: 0.25; } | |
48% { opacity: 0; } | |
60% { opacity: 0.25; } | |
72% { opacity: 0.5; } | |
84% { opacity: 0.75; } | |
100% { opacity: 1; } | |
} | |
@-o-keyframes blink { | |
0% { opacity: 1; } | |
12% { opacity: 0.75; } | |
24% { opacity: 0.5; } | |
36% { opacity: 0.25; } | |
48% { opacity: 0; } | |
60% { opacity: 0.25; } | |
72% { opacity: 0.5; } | |
84% { opacity: 0.75; } | |
100% { opacity: 1; } | |
} | |
/* Usage */ | |
.your-element { | |
animation: blink 2s infinite; | |
-moz-animation: blink 2s infinite; | |
-webkit-animation: blink 2s infinite; | |
-o-animation: blink 2s infinite; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment