Created
July 3, 2015 14:51
-
-
Save jesusalber1/d240bd14ed179a22cdac to your computer and use it in GitHub Desktop.
Bounce preloader
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
.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); | |
} | |
} |
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="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