Skip to content

Instantly share code, notes, and snippets.

@jesusalber1
Created July 3, 2015 14:51
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/d240bd14ed179a22cdac to your computer and use it in GitHub Desktop.
Save jesusalber1/d240bd14ed179a22cdac to your computer and use it in GitHub Desktop.
Bounce preloader
.preloader {
display: inline-block;
position: relative;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.item {
width: 30px;
height: 30px;
border-radius: 50%;
background: #2ecc71;
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
-webkit-animation: bounce 2s infinite ease-in-out;
animation: bounce 2s infinite ease-in-out;
}
.item:nth-child(2) {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
@-webkit-keyframes bounce {
0%, 100% {
-webkit-transform: scale(0);
}
50% {
-webkit-transform: scale(1);
}
}
@keyframes bounce {
0%, 100% {
transform: scale(0);
-webkit-transform: scale(0);
}
50% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
<div class="preloader">
<div class="item"></div>
<div class="item"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment