Skip to content

Instantly share code, notes, and snippets.

@gfarrell
Created May 13, 2014 17:35
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/7a072a93c1027514b59c to your computer and use it in GitHub Desktop.
Save gfarrell/7a072a93c1027514b59c to your computer and use it in GitHub Desktop.
Quattro progress indicator
/**
* Quattro progress indicator
*/
.quattro-progress {
border: #CCC 10px solid;
border-radius: 50%;
width: 100px;
height: 100px;
transform: rotate(45deg);
animation-direction: alternate;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.quattro-progress.p0 {
animation-name: p0;
}
.quattro-progress.p25 {
border-top-color: #7fa39f;
animation-name: p25;
}
.quattro-progress.p50 {
border-top-color: #7fa39f;
border-right-color: #7fa39f;
animation-name: p50;
}
.quattro-progress.p75 {
border-top-color: #7fa39f;
border-right-color: #7fa39f;
border-bottom-color: #7fa39f;
animation-name: p75;
}
.quattro-progress.p100 {
border-color: #7fa39f;
}
@keyframes p0 {
0% {
border-top-color: #CCC;
}
100% {
border-top-color: #7fa39f;
}
}
@keyframes p25 {
0% {
border-right-color: #CCC;
}
100% {
border-right-color: #7fa39f;
}
}
@keyframes p50 {
0% {
border-bottom-color: #CCC;
}
100% {
border-bottom-color: #7fa39f;
}
}
@keyframes p75 {
0% {
border-left-color: #CCC;
}
100% {
border-left-color: #7fa39f;
}
}
html,body {
width: 100%;
height: 100%
}
.centre {
position: absolute;
margin: auto;
left: 0;
top: 0;
bottom: 0;
right: 0;
}
<div class="quattro-progress centre"></div>
$(function() {
});
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"javascript"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment