Created
July 20, 2013 21:57
-
-
Save bavey/6046563 to your computer and use it in GitHub Desktop.
A CodePen by David DeSandro. Loader dots - Lamer version of http://codepen.io/jshawl/pen/IFxBK
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="loader"> | |
<div class="dot dot1"></div> | |
<div class="dot dot2"></div> | |
<div class="dot dot3"></div> | |
<div class="dot dot4"></div> | |
</div> |
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
.loader { | |
position: relative; | |
width: 80px; | |
margin: 100px auto; | |
} | |
.dot { | |
width: 20px; | |
height: 20px; | |
border-radius: 10px; | |
background: #333; | |
position: absolute; | |
animation-duration: 0.5s; | |
animation-timing-function: ease; | |
animation-iteration-count: infinite; | |
} | |
.dot1, .dot2 { | |
left: 0; | |
} | |
.dot3 { left: 30px; } | |
.dot4 { left: 60px; } | |
@keyframes reveal { | |
from { transform: scale(0.001); } | |
to { transform: scale(1); } | |
} | |
@keyframes slide { | |
to { transform: translateX(30px) } | |
} | |
.dot1 { | |
animation-name: reveal; | |
} | |
.dot2, .dot3 { | |
animation-name: slide; | |
} | |
.dot4 { | |
animation-name: reveal; | |
animation-direction: reverse; /* thx @HugoGiraudel */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment