Skip to content

Instantly share code, notes, and snippets.

@jesusalber1
Created June 16, 2015 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesusalber1/e4a63274cdaf050e94a2 to your computer and use it in GitHub Desktop.
Save jesusalber1/e4a63274cdaf050e94a2 to your computer and use it in GitHub Desktop.
Bubbles preloader
.preloader {
display: inline-block;
position: relative;
}
.preloader-item {
-webkit-animation: anim-preloader-item 1s ease-in-out infinite alternate;
animation: anim-preloader-item 1s ease-in-out infinite alternate;
background: #2ecc71;
border-radius: 50%;
display: inline-block;
float: left;
height: 30px;
width: 30px;
}
.preloader-item:not(:first-child) {
margin-left: 1rem;
}
.preloader-item:nth-child(1) {
-webkit-animation-delay: -0.7s;
animation-delay: -0.7s;
}
.preloader-item:nth-child(2) {
-webkit-animation-delay: -0.4s;
animation-delay: -0.4s;
}
.preloader-item:nth-child(3) {
-webkit-animation-delay: -0.1s;
animation-delay: -0.1s;
}
@-webkit-keyframes anim-preloader-item {
0% {
-webkit-transform: scale(0.5);
transform: scale(0.5);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes anim-preloader-item {
0% {
transform: scale(0.5);
}
100% {
transform: scale(1);
}
}
<div class="preloader">
<div class="preloader-item"></div>
<div class="preloader-item"></div>
<div class="preloader-item"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment