Created
May 11, 2014 20:46
-
-
Save gfarrell/dec16beeaafd68e5a735 to your computer and use it in GitHub Desktop.
Animated activity indicator
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
/** | |
* Animated activity indicator | |
*/ | |
html, body { | |
width: 100%; | |
height: 100%; | |
} | |
.activity-indicator { | |
width: 10px; | |
height: 10px; | |
border: 5px solid #CCC; | |
border-radius: 50%; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
margin:auto; | |
position: absolute; | |
transition: width 0.5s cubic-bezier(.35,-0.31,.8,1.6), | |
height 0.5s cubic-bezier(.35,-0.31,.8,1.6), | |
border-color 0.01s linear 0s; | |
} | |
.activity-indicator:hover { | |
width: 50px; | |
height: 50px; | |
border: 5px solid #CCC; | |
border-top: #7fa39f solid 5px; | |
animation: spin 1s cubic-bezier(.35,-0.31,.8,1.6) infinite 1s; | |
transition: width 0.5s cubic-bezier(.35,-0.31,.8,1.6), | |
height 0.5s cubic-bezier(.35,-0.31,.8,1.6), | |
border-color 0.5s linear 0.5s; | |
} | |
@keyframes spin { | |
100% { | |
transform: rotate(360deg); | |
} | |
} |
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="activity-indicator"></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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment