Create mac style button - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Button

Description

Create mac style button

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#nav {<!-- ww w . j a  va 2s .c  o m-->
   float:left;
   margin:0 0 4em 0;
   padding:0;
   list-style:none;
   background-color:Chartreuse;
   border-bottom:2px solid yellow;
   border-top:2px solid blue;
   font-family:"Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
   letter-spacing:-0.6px;
   font-size:13px;
   border-radius:9px;
   -moz-border-radius:9px;
   -webkit-border-radius:9px;
}

#nav li {
   float:left;
   background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0, pink), color-stop(0.6, OrangeRed), color-stop(0.52, grey), color-stop(2, BlueViolet));
   background-image:-moz-linear-gradient(center bottom, Chartreuse 0%, yellow 51%, blue 52%, pink 100%);
   background-color:OrangeRed;
}

#nav li a {
   display:block;
   padding:9px 31px;
   text-decoration:none;
   font-weight:bold;
   color:grey;
   border-right:2px solid BlueViolet;
}

#nav li a:hover {
   color:Chartreuse;
   background-color:yellow;
}

#nav li:first-child {
   -moz-border-radius:5px 0 0 5px;
   -webkit-border-radius:5px 0 0 5px;
   border-radius:5px 0 0 5px;
   border-left:none;
}

#nav li:first-child a:hover {
   -moz-border-radius:5px 0 0 5px;
   -webkit-border-radius:5px 0 0 5px;
   border-radius:5px 0 0 5px;
   border-right:none;
}

#nav li:last-child {
   -moz-border-radius:0 5px 5px 0;
   -webkit-border-radius:0 5px 5px 0;
   border-radius:0 5px 5px 0;
   border-right:none;
}

#nav li:last-child a {
   border-right:none;
}

#nav li:last-child a:hover {
   -moz-border-radius:0 5px 5px 0;
   -webkit-border-radius:0 5px 5px 0;
   border-radius:0 5px 5px 0;
}
</style> 
 </head> 
 <body> 
  <ul id="nav"> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials