Skip to content

Instantly share code, notes, and snippets.

@skylamer
Forked from chriscoyier/dabblet.css
Created January 27, 2012 08:30
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 skylamer/1687782 to your computer and use it in GitHub Desktop.
Save skylamer/1687782 to your computer and use it in GitHub Desktop.
Animate to natural width
/* Animate to natural width */
body,html { width:100%;height:100%; background: #111; padding: 33px 0; margin: 0; }
progress {
box-shadow: 0 0 3px 1px white, inset 1px 1px 1px 3px rgba(111,111,111,.33);
border: 3px double #fff;
border-radius: 11px;
color: white;
background: green;
overflow: hidden;
white-space: nowrap;
padding: 10px 20px;
border-radius: 10px;
animation: progress-bar 3s;
width:88%;
}
span:after {
clear:both;
color:red;
content:"88%"
}
@keyframes progress-bar {
0% { width: 0; }
}
/*
:before,:after{
clear:both
}
progress {
margin-top:50%;
overflow:hidden;
white-space: nowrap;
width:100%;
animation:progress 2s
}
@keyframes progress {
0%{width:0}
}
*/
<progress value=88></progress>
<span>
{"view":"split-vertical","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment