小提琴在这里:
HTML
<ul class="menu">
<li><a href="#">Overview</a></li>
<li><a href="#">Usase</a></li>
<li><a href="#">Inner-Workings</a></li>
<li><a href="#">Animation</a></li>
<li><a href="#">Options</a></li>
</ul>
CSS
.menu {
padding: 0;
list-style: none;
max-width: 10em;
overflow: hidden;
background-color: gray;
}
.menu li {
display: block;
width: 100%;
float: left;
border-bottom: 1px solid rgba(0,0,0,.6);
border-top: 1px solid rgba(255,255,255,.2);
}
.menu li a {
display: block;
width: 100%;
float: left;
font-family: arial;
font-size: 1em;
color: white;
font-weight: bold;
padding: .6em 1em;
text-decoration: none;
background-color: gray;
}
.menu li:first-of-type {
border-top: none;
}
.menu li:last-of-type {
border-bottom: none;
}
.menu li a {
/* such ugly code */
background: #7f7f7f;
background: -moz-linear-gradient(top, #7f7f7f 0%, #474747 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7f7f7f), color-stop(100%,#474747));
background: -webkit-linear-gradient(top, #7f7f7f 0%,#474747 100%);
background: -o-linear-gradient(top, #7f7f7f 0%,#474747 100%);
background: -ms-linear-gradient(top, #7f7f7f 0%,#474747 100%);
background: linear-gradient(to bottom, #7f7f7f 0%,#474747 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7f7f7f', endColorstr='#474747',GradientType=0 );
}