A Pen by Johan Olsson on CodePen.
Created
November 29, 2014 05:21
-
-
Save charlenopires/6cc3fc84205bfa471d78 to your computer and use it in GitHub Desktop.
square loader
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"> | |
<row> | |
<span></span> | |
<span></span> | |
<span></span> | |
</row> | |
<row> | |
<span></span> | |
<span></span> | |
<span></span> | |
</row> | |
<row> | |
<span></span> | |
<span></span> | |
<span></span> | |
</row> | |
</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
body { | |
text-align: center; | |
padding-top: 20%; | |
background: #1d1f20; | |
} | |
.loader { | |
width: 100px; | |
height: 100px; | |
display: inline-table; | |
box-sizing: border-box; | |
position: relative; | |
border-spacing: 0.3em; | |
} | |
.loader row { | |
display: table-row; | |
} | |
.loader row span { | |
display: table-cell; | |
position: relative; | |
background: #fdfdfd; | |
opacity: 0; | |
-webkit-animation: flicker 0.5985999999999999s ease-out infinite alternate; | |
} | |
@-webkit-keyframes flicker { | |
from, 20% { | |
opacity: 0; | |
} | |
100%, to { | |
opacity: 1; | |
} | |
} | |
.loader row:nth-child(1) span:nth-child(1) { -webkit-animation-delay: .50s; } | |
.loader row:nth-child(1) span:nth-child(2) { -webkit-animation-delay: .70s; } | |
.loader row:nth-child(1) span:nth-child(3) { -webkit-animation-delay: .60s; } | |
.loader row:nth-child(2) span:nth-child(1) { -webkit-animation-delay: .20s; } | |
.loader row:nth-child(2) span:nth-child(2) { -webkit-animation-delay: .80s; } | |
.loader row:nth-child(2) span:nth-child(3) { -webkit-animation-delay: .90s; } | |
.loader row:nth-child(3) span:nth-child(1) { -webkit-animation-delay: .10s; } | |
.loader row:nth-child(3) span:nth-child(2) { -webkit-animation-delay: .30s; } | |
.loader row:nth-child(3) span:nth-child(3) { -webkit-animation-delay: .40s; } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment