Last active
May 2, 2017 17:21
-
-
Save sloyless/64d51d994a44c94facbff15da172dd40 to your computer and use it in GitHub Desktop.
Loading dot animation CSS
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 { | |
/** | |
* At the start of the animation the dot | |
* has an opacity of .2 | |
*/ | |
0% { | |
opacity: .2; | |
} | |
/** | |
* At 20% the dot is fully visible and | |
* then fades out slowly | |
*/ | |
20% { | |
opacity: 1; | |
} | |
/** | |
* Until it reaches an opacity of .2 and | |
* the animation can start again | |
*/ | |
100% { | |
opacity: .2; | |
} | |
} | |
.issue-loading span { | |
animation-name: blink; | |
animation-duration: 1.4s; | |
animation-iteration-count: infinite; | |
animation-fill-mode: both; | |
&:nth-child(2) { | |
animation-delay: .2s; | |
} | |
&:nth-child(3) { | |
animation-delay: .4s; | |
} | |
} |
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="issue-loading"> | |
Loading<span>.</span><span>.</span><span>.</span> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment