Skip to content

Instantly share code, notes, and snippets.

@itguy51
Created March 28, 2013 03:12
Show Gist options
  • Save itguy51/5260255 to your computer and use it in GitHub Desktop.
Save itguy51/5260255 to your computer and use it in GitHub Desktop.
GarageBand-Style Time Bar in CSS
#mainBar{
background: rgb(203,203,203); /* Old browsers */
background: -moz-linear-gradient(top, rgba(203,203,203,1) 0%, rgba(154,155,154,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(203,203,203,1)), color-stop(100%,rgba(154,155,154,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(203,203,203,1) 0%,rgba(154,155,154,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cbcbcb', endColorstr='#9a9b9a',GradientType=0 ); /* IE6-9 */
}
#timeBack{
background: rgb(33,37,42); /* Old browsers */
background: -moz-linear-gradient(top, rgba(33,37,42,1) 0%, rgba(37,48,85,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(33,37,42,1)), color-stop(100%,rgba(37,48,85,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(33,37,42,1) 0%,rgba(37,48,85,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(33,37,42,1) 0%,rgba(37,48,85,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(33,37,42,1) 0%,rgba(37,48,85,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(33,37,42,1) 0%,rgba(37,48,85,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#21252a', endColorstr='#253055',GradientType=0 ); /* IE6-9 */
z-index: 1;
}
#timeFore{
background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%, rgba(251,251,251,0) 51%, rgba(33,37,42,0) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(50%,rgba(255,255,255,1)), color-stop(51%,rgba(251,251,251,0)), color-stop(100%,rgba(33,37,42,0))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 50%,rgba(251,251,251,0) 51%,rgba(33,37,42,0) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 50%,rgba(251,251,251,0) 51%,rgba(33,37,42,0) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 50%,rgba(251,251,251,0) 51%,rgba(33,37,42,0) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 50%,rgba(251,251,251,0) 51%,rgba(33,37,42,0) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#0021252a',GradientType=0 ); /* IE6-9 */
z-index: 1000;
opacity: 10%;
}
.timepiece{
position: absolute;
border-radius: 3px;
width: 221px;
height: 50px;
margin-top: 10px;
margin-bottom: 12px;
margin-left: auto;
margin-right: auto;
}
.mainBar{
height: 73px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment