Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created November 11, 2013 06:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save LeaVerou/7408996 to your computer and use it in GitHub Desktop.
Save LeaVerou/7408996 to your computer and use it in GitHub Desktop.
Google-style progress indicator (process)
/**
* Google-style progress indicator (process)
*/
.progress {
display: inline-block;
font-size: 50px; /* Size of the progress indicator */
width: 1em;
height: 1em;
border: 0 solid grey;
border-radius: 50%;
box-sizing: border-box;
background: silver;
background-origin: border-box;
}
.progress:nth-of-type(2) { border-left-width: .1em; }
.progress:nth-of-type(3) { border-left-width: .2em; }
.progress:nth-of-type(4) { border-left-width: .3em; }
.progress:nth-of-type(5) { border-left-width: .4em; }
.progress:nth-of-type(6) { border-left-width: .5em }
.progress:nth-of-type(7) { border-left-width: .6em }
.progress:nth-of-type(8) { border-left-width: .7em }
.progress:nth-of-type(9) { border-left-width: .8em }
.progress:nth-of-type(10) { border-left-width: .9em }
.progress:nth-of-type(11) {
background: linear-gradient(grey 50%, silver 50%);
transform: rotate(90deg);
}
h1 {
font: bold 100% sans-serif;
}
<h1>Increasing border-left width</h1>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<div class="progress"></div>
<h1>Split background colours</h1>
<div class="progress"></div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment