CSS3 Button Listing
Let's make some CSS3 buttons!
by Travis
HTML
<h1>CSS3 Button Listing</h1>
<span id="by">by Travis Maynard</span>
<div class="darkBG">
<a href="#" class="btnBlack">Button</a>
</div>
<div class="lightBG">
<a href="#" class="btnWhite">Button</a>
</div>
<div class="darkBG">
<a href="#" class="btnRed">Download</a>
</div>
CSS
body {color:#fff; font:normal 100% Sans-Serif; padding:10px;background:#343434;}
h1 {font-size:1.5em; text-shadow:1px 1px #000;}
a {color:#fff; text-decoration:none;}
#by {font-size:0.7em;}
.darkBG {padding:10px; background:#343434;}
.lightBG {padding:10px; background:#e6e6e6;}
/***********
Black Button
***********/
.btnBlack {
width:75px;font-size:0.7em;
text-align:center;
margin:5px 0px;
padding:10px;
background:#1e1e1e;
background-image: -webkit-linear-gradient(bottom, #1e1e1e, #404040);
box-shadow:inset 0px 1px 0px #656565;
border:1px solid #000;
border-radius:3px;
cursor:pointer;
display:block;
}
.btnBlack:hover {
background-image: -webkit-linear-gradient(bottom, #464646, #838383);
box-shadow:inset 0px 1px 0px #9c9c9c;
}
.btnBlack:active {
background-image: -webkit-linear-gradient(bottom, #464646, #838383);
box-shadow:inset 0px 0px 10px #000;
border-right:1px solid #656565;
border-bottom:1px solid #656565;
}
/***********
White Button
***********/
.btnWhite {
width:75px;font-size:0.7em;
color:#000;
text-align:center;
margin:5px 0px;
padding:10px;
background:#1e1e1e;
background-image: -webkit-linear-gradient(bottom, #bdbdbd, #ebebeb);
box-shadow:inset 0px 1px 0px #f1f1f1;
border:1px solid #cccccc;
border-bottom:1px solid #646464;
border-radius:3px;
cursor:pointer;
display:block;
}
.btnWhite:hover {
background-image: -webkit-linear-gradient(bottom, #cdcdcd, #fcfcfc);
box-shadow:inset 0px 1px 0px #fff;
}
.btnWhite:active {
background-image: -webkit-linear-gradient(bottom, #cdcdcd, #fcfcfc);
box-shadow:inset 0px 0px 10px #000;
border-right:1px solid #656565;
border-bottom:1px solid #656565;
}
/*********
Red Button
*********/
.btnRed {
width:75px;
font-size:0.9em;
text-align:center;
text-shadow:1px 1px 0px #000;
margin:5px 0px;
padding:10px;
...