Skip to content

Instantly share code, notes, and snippets.

@maryleloisa
Last active November 14, 2016 21:48
Show Gist options
  • Save maryleloisa/00455070837f0f51eac3ce5e551ac409 to your computer and use it in GitHub Desktop.
Save maryleloisa/00455070837f0f51eac3ce5e551ac409 to your computer and use it in GitHub Desktop.
$ease-in-out: ease-in-out;
$wait: 1000ms;
$stagger: 80ms;
$duration: 2000ms;
.cs-loader {
color: $color-pink;
text-align: center;
}
.cs-loader i {
font-size: 30px;
margin: 0;
opacity: 0;
display: inline-block;
}
@keyframes lol {
0% {
opacity: 0;
transform: translateX(-150px);
}
33% {
opacity: 1;
transform: translateX(0px);
}
66% {
opacity: 1;
transform: translateX(0px);
}
100% {
opacity: 0;
transform: translateX(150px);
}
}
.cs-loader i:nth-child(5) {
animation: lol $duration $wait infinite $ease-in-out;
}
.cs-loader i:nth-child(4) {
animation: lol $duration $wait + $stagger infinite $ease-in-out;
}
.cs-loader i:nth-child(3) {
animation: lol $duration $wait + $stagger*2 infinite $ease-in-out;
}
.cs-loader i:nth-child(2) {
animation: lol $duration $wait + $stagger*3 infinite $ease-in-out;
}
.cs-loader i:nth-child(1) {
animation: lol $duration $wait + $stagger*4 infinite $ease-in-out;
}
<div class="cs-loader">
<i class="transport"></i>
<i class="transport"></i>
<i class="transport"></i>
<i class="transport"></i>
<i class="transport"></i>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment