Skip to content

Instantly share code, notes, and snippets.

@gfarrell
Created May 11, 2014 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfarrell/dec16beeaafd68e5a735 to your computer and use it in GitHub Desktop.
Save gfarrell/dec16beeaafd68e5a735 to your computer and use it in GitHub Desktop.
Animated activity indicator
/**
* 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);
}
}
<div class="activity-indicator"></div>
// alert('Hello world!');
{"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