Skip to content

Instantly share code, notes, and snippets.

@justmarkup
Created January 31, 2012 19:28
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 justmarkup/1712390 to your computer and use it in GitHub Desktop.
Save justmarkup/1712390 to your computer and use it in GitHub Desktop.
Loading...
/**
* Loading...
*/
/**
* An attempt of an accessible and crossbrowser loading bar.
* Remove the animations from the pseudo elements to see how it looks like in old browsers, simple eh?
*/
@keyframes load {
0% {left: 0; background-color: #ddd}
50% {left: 80px; opacity: 0.8; width: 70px}
100% {left: 200px; width: 20px; opacity: 1; background-color: #ddd}
}
@keyframes hideload {
0% {background-color: #fff}
100% {background-color: #fff}
}
#progress:before {
position: absolute;
z-index: 1;
content: "";
width: 300px;
height: 20px;
animation: hideload 2400ms infinite alternate
}
#progress:after {
content: "";
z-index: 2;
position: absolute;
left: 0;
border-radius: 4px;
width: 20px;
height: 20px;
animation: load 2400ms infinite alternate
}
<div id="progress">Loading, please wait</div>
{"view":"split","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment