CSS Stylish Button
Look at how CSS gradients, shadows, borders, transitions and transforms can all be combined to create a stylish button.
HTML
<!-- Throw in a nice looking font just for the fun of it -->
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,700,300,200"/>
<div id="container">
<a href="#" class="btn">Push Me</a>
</div>
CSS
body, div {
margin: 0;
padding: 0;
border: 0;
}
body {
/*background: url("http://jenniferperrin.com/image/background.gif");*/
}
#container {
width: 600px;
margin: 100px auto;
}
a.btn {
height: 60px;
padding: 20px;
margin: 0 auto;
background: #d46a15; /* old browsers */
background: -moz-linear-gradient(top, #d798000%, #d46a15 100%); /* firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d79800), color-stop(100%,#d46a15)); /* webkit */
box-shadow: inset 0px 0px 6px #fff;
-webkit-box-shadow: inset 0px 0px 6px #fff;
border: 1px solid #222222;
border-radius: 10px;
font-size: 35px;
font-family: 'Yanone Kaffeesatz';
text-align: center;
text-transform: uppercase;
text-decoration: none;
color: #222222;
text-shadow: 0px 1px 2px #bf4c24;
-moz-transition: color 0.25s ease-in-out;
-webkit-transition: color 0.25s ease-in-out;
transition: color 0.25s ease-in-out;
}
a.btn:hover {
color: #efefef;
-moz-transition: color 0.25s ease-in-out;
-webkit-transition: color 0.25s ease-in-out;
transition: color 0.25s ease-in-out;
}
a.btn:active {
-moz-transform: translate(0px, 3px);
-webkit-transform: translate(0px, 3px);
}