Skip to content

Instantly share code, notes, and snippets.

@mikeprevette
Forked from anonymous/dabblet.css
Created March 22, 2014 18:58
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 mikeprevette/9712440 to your computer and use it in GitHub Desktop.
Save mikeprevette/9712440 to your computer and use it in GitHub Desktop.
Attempt for Chrome-style progress-indicator with SVG and CSS animations
/**
* Attempt for Chrome-style progress-indicator with SVG and CSS animations
*/
@keyframes spin {
0% {
stroke: #00aeef
}
37.5% {
stroke: #ed1c24;
}
67.5% {
stroke: #f69f37;
stroke-width: 5;
}
100% {
stroke-dashoffset: -240;
stroke: #00aeef;
}
}
svg {
width: 500px;
height: 500px;
}
polygon {
stroke: black;
stroke-linecap: square;
stroke-width: 1;
stroke-dasharray: 0, 0, 50, 190;
stroke-dashoffset: 0;
stroke-linejoin: round;
animation: spin 9.5s infinite linear;
}
<svg class="progress" viewBox="0 0 52.56 60.756" >
<polygon fill="none" stroke="#000000" stroke-miterlimit="1" points="
26.844,50.531 9.975,41.525 9.975,21.517 26.844,31.531 43.714,21.125 43.714,42.047 26.844,50.531 26.844,31.531 9.975,21.517
26.844,11.531 43.714,21.125 26.844,31.531 "/>
</svg>
// 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