Skip to content

Instantly share code, notes, and snippets.

@xFGhoul
Created December 10, 2020 22:44
Show Gist options
  • Save xFGhoul/03cee7bb68132fcac02f6411af440a71 to your computer and use it in GitHub Desktop.
Save xFGhoul/03cee7bb68132fcac02f6411af440a71 to your computer and use it in GitHub Desktop.
.ball-loader {
width: 100px;
height: 23.33333px;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
.ball-loader-ball {
will-change: transform;
height: 23.33333px;
width: 23.33333px;
border-radius: 50%;
background-color: black;
position: absolute;
animation: grow 1s ease-in-out infinite alternate;
}
.ball-loader-ball.ball1 {
left: 0;
transform-origin: 100% 50%;
}
.ball-loader-ball.ball2 {
left: 50%;
transform: translateX(-50%) scale(1);
animation-delay: 0.33s;
}
.ball-loader-ball.ball3 {
right: 0;
animation-delay: 0.66s;
}
@keyframes grow {
to {
transform: translateX(-50%) scale(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment