CSS3 Button Contest
My entry into the CSS3 Button Contest on Forrst. http://forrst.com/posts/CSS_Button_Contest-5J1
by nate
HTML
<ul class="buttons">
<li><a href="#">Home</a></li>
<li><a href="#1">About</a></li>
<li><a href="#2">Work</a></li>
<li><a href="#3">Contact</a></li>
</ul>
CSS
body {
background-color: hsl( 0, 0%, 80% );
}
h2 {
clear: left;
color: hsl(0, 0%, 50%);
display: block;
font-family: Futura, sans-serif;
font-size: 24px;
margin: 0.5em 0;
}
ul.buttons {
float: left;
margin: 0 0 1em;
overflow: hidden;
padding: 0;
}
ul.buttons li {
float: left;
margin-left: -5px;
padding-left: 5px;
padding-top: 5px;
}
ul.buttons.firefox li:first-child, ul.buttons li:first-child {
margin-left: 0;
padding-left: 5px;
}
ul.buttons li:last-child {
-webkit-mask: right bottom url(http://nateeagle.com/images/css3buttons/alpha-mask.png);
}
ul.buttons li a {
background: hsla(0, 0%, 70%, 1);
border-bottom: 1px solid hsla(0, 0%, 40%, 1);
border-left: 1px solid hsla(0, 0%, 40%, 1);
border-top: 1px solid hsla(0, 0%, 40%, 1);
color: white;
display: block;
font-family: Futura, Arial, sans-serif;
font-size: 18px;
left: -5px;
padding: 7px 15px;
position: relative;
text-decoration: none;
text-transform: uppercase;
top: -5px;
}
ul.buttons li a {
background:
-webkit-gradient(
linear,
50% bottom,
50% top,
color-stop(0, hsl(0,0%,70%)),
color-stop(0.50, hsl(0,0%,78%))
);
text-shadow:
-1px -1px 0px hsla(0, 0%, 40%, 0.5);
-webkit-box-shadow:
1px 1px 0 hsla(0, 0%, 40%, 1),
2px 2px 0 hsla(0, 0%, 40%, 1),
3px 3px 0 hsla(0, 0%, 40%, 1),
4px 4px 0 hsla(0, 0%, 40%, 1),
5px 5px 0 hsla(0, 0%, 40%, 1);
-webkit-transition:
background-color 0.5s ease-out 0,
left 0.5s ease-out 0,
top 0.5s ease-out 0,
-webkit-box-shadow 0 linear 0;
}
ul.buttons li:first-child a, ul.buttons.firefox li:first-child a {
border-radius: 10px 0 0 10px;
-moz-border-radius: 10px 0 0 10px;
-webkit-border-radius: 10px 0 0 10px;
}
ul.buttons li:last-child a, ul.buttons.firefox li:last-child a {
...