Skip to content

Instantly share code, notes, and snippets.

@xav76
Created October 24, 2012 17:19
Show Gist options
  • Save xav76/3947444 to your computer and use it in GitHub Desktop.
Save xav76/3947444 to your computer and use it in GitHub Desktop.
A CodePen by Tyrus. Progress Bars - Simple progress bar styles. *Chris Coyier's scalable background image technique: http://css-tricks.com/perfect-full-page-background-image/
<div id="bg">
<img src="http://img.skitch.com/20120814-m3ei5cptau2yjn7sgi2a4i62kn.png" alt="">
</div>
<div class="wrapper">
<div class="progress"></div>
</div>
<div class="wrapper">
<div class="progress_2"></div>
</div>
<div class="wrapper_2">
<div class="progress"></div>
</div>
<div class="wrapper_2">
<div class="progress_2"></div>
</div>
body {
height: 100%;
background: #bdbdc7;
}
#bg {
position:fixed;
top:-50%;
left:-50%;
width:200%;
height:100%;
}
#bg img {
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
margin:auto;
min-width:50%;
min-height:50%;
}
.wrapper {
width: 420px;
background: #ffffff;
padding: 0px;
border-radius: 30px;
margin: 50px auto;
border: 1px solid rgba(0,0,0,0.75);
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.25),
inset 0 0 5px rgba(0,0,0,0.3),
0 2px 2px rgba(256,256,256,0.45),
inset 0 10px 20px rgba(0,0,0,0.15);
position: relative;
}
.wrapper_2 {
width: 420px;
background: #484850;
padding: 0px;
border-radius: 30px;
margin: 50px auto;
border: 1px solid rgba(0,0,0,0.75);
box-shadow:
/*inset 0 1px 0 rgba(255,255,255,0.25),*/
inset 0 0 5px rgba(0,0,0,0.3),
0 2px 2px rgba(256,256,256,0.45),
inset 0 5px 10px rgba(0,0,0,0.5);
position: relative;
}
.progress {
width: 75%;
height: 20px;
border-radius: 50px 5px 5px 50px;
background-color: hsla(199, 55%, 45%, 1);
position: relative;
box-shadow:
/* This is the top gradient for the color bar */
inset 0 10px 0 rgba(255,255,255,0.2),
inset 0 2px 2px rgba(0,0,0,0.125);
cursor: pointer;
margin: 0 0px;
border-right: 1px solid rgba(0,0,0,0.75);
}
.progress_2 {
width: 50%;
height: 20px;
border-radius: 50px 5px 5px 50px;
background-color: hsla(131, 55%, 45%, 1);
position: relative;
box-shadow:
/* This is the top gradient for the color bar */
inset 0 10px 0 rgba(255,255,255,0.2),
inset 0 2px 2px rgba(0,0,0,0.125);
cursor: pointer;
margin: 0 0px;
border-right: 1px solid rgba(0,0,0,0.75);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment