This square spins and fills. It wants to be cool like all of the other squares.
Created
September 21, 2014 16:48
-
-
Save amirnaeem/0e9afa01ab4b2653540e to your computer and use it in GitHub Desktop.
A Pen by Josh.
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
<span class="loader"><span class="loader-inner"></span></span> |
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, html { | |
height: 100%; | |
text-align: center; | |
} | |
body { | |
background-color: #D2312B; | |
} | |
.loader { | |
display: inline-block; | |
width: 30px; | |
height: 30px; | |
position: relative; | |
border: 4px solid #FBFBFB; | |
top: 50%; | |
animation: loader 4s infinite ease; | |
} | |
.loader-inner { | |
vertical-align: top; | |
display: inline-block; | |
width: 100%; | |
background-color: #FBFBFB; | |
animation: loader-inner 4s infinite ease-in; | |
} | |
@keyframes loader { | |
0% { | |
transform: rotate(0deg); | |
} | |
25% { | |
transform: rotate(180deg); | |
} | |
50% { | |
transform: rotate(180deg); | |
} | |
75% { | |
transform: rotate(360deg); | |
} | |
100% { | |
transform: rotate(360deg); | |
} | |
} | |
@keyframes loader-inner { | |
0% { | |
height: 0%; | |
} | |
25% { | |
height: 0%; | |
} | |
50% { | |
height: 100%; | |
} | |
75% { | |
height: 100%; | |
} | |
100% { | |
height: 0%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment