Untuk membuat menu glossy seperti contoh di atas kodenya sebagai berikut :
<html>
<head>
<style type="text/css">
#pad {height:100px;}
#menu {padding:0; margin:0; list-style:none;}
#menu li {float:left; margin-left:1px; padding-top:2px;}
#menu li a {display:block; height:36px; line-height:36px; padding:0 25px 0 0; float:left; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRmSwzQN7SS7N5m4h1vRitFwjhzSNXAO1Q1rYRu4uhqZOcmc8w6u3T2n2QVBb8dMxTf8PBp7n2r2kaw1nsZoZ1YMTagHI1wvBLWFGiuVwdrfS8W0IhcuPegUZdaU_cLnAD_vzSx1PxbL8/w30-h72-no/taba.gif) no-repeat right top; color:#ddd; text-decoration:none;}
#menu li a b {display:block; height:36px; float:left; padding:0 0 0 25px; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9WrIzEXMbxriQrR-Xyyh5Xk7teGTO8h19Sj1h8O_C3QlQnepJ1Lgtt-FSdgWk_hWhnqb7xe58dpJPixIgk_Qt8ZGMs_ZsN6bXRGsbye_geJIcrSaQpJ4KVOE_Vt8mgTCE5DMQiYeIqyj8/w201-h72-no/tabb.gif) left top; cursor:pointer;}
#menu li a:hover,
#menu li a:active,
#menu li a:focus,
.home #menu li#home a,
.single #menu li#single a,
.dropdown #menu li#dropdown a,
.dropline #menu li#dropline a,
.flyout #menu li#flyout a,
.support #menu li#support a,
.contact #menu li#contact a
{background-position:right -36px; line-height:34px; color:#fff;}
#menu li a:hover b,
#menu li a:active b,
#menu li a:focus b,
.home #menu li#home a b,
.single #menu li#single a b,
.dropdown #menu li#dropdown a b,
.dropline #menu li#dropline a b,
.flyout #menu li#flyout a b,
.support #menu li#support a b,
.contact #menu li#contact a b
{background-position:left -36px;}
</style>
</head>
<body>
<ul id="menu">
<li id="home"><a href="index.html"><b>Home</b></a></li>
<li id="single"><a href="single.html"><b>Single Level</b></a></li>
<li id="dropdown"><a href="dropdown.html"><b>Dropdown</b></a></li>
<li id="dropline"><a href="dropline.html"><b>Dropline</b></a></li>
<li id="flyout"><a href="flyout.html"><b>Flyout</b></a></li>
<li id="support"><a href="support.html"><b>Support</b></a></li>
</ul>
</body>
</html>
<head>
<style type="text/css">
#pad {height:100px;}
#menu {padding:0; margin:0; list-style:none;}
#menu li {float:left; margin-left:1px; padding-top:2px;}
#menu li a {display:block; height:36px; line-height:36px; padding:0 25px 0 0; float:left; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGRmSwzQN7SS7N5m4h1vRitFwjhzSNXAO1Q1rYRu4uhqZOcmc8w6u3T2n2QVBb8dMxTf8PBp7n2r2kaw1nsZoZ1YMTagHI1wvBLWFGiuVwdrfS8W0IhcuPegUZdaU_cLnAD_vzSx1PxbL8/w30-h72-no/taba.gif) no-repeat right top; color:#ddd; text-decoration:none;}
#menu li a b {display:block; height:36px; float:left; padding:0 0 0 25px; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9WrIzEXMbxriQrR-Xyyh5Xk7teGTO8h19Sj1h8O_C3QlQnepJ1Lgtt-FSdgWk_hWhnqb7xe58dpJPixIgk_Qt8ZGMs_ZsN6bXRGsbye_geJIcrSaQpJ4KVOE_Vt8mgTCE5DMQiYeIqyj8/w201-h72-no/tabb.gif) left top; cursor:pointer;}
#menu li a:hover,
#menu li a:active,
#menu li a:focus,
.home #menu li#home a,
.single #menu li#single a,
.dropdown #menu li#dropdown a,
.dropline #menu li#dropline a,
.flyout #menu li#flyout a,
.support #menu li#support a,
.contact #menu li#contact a
{background-position:right -36px; line-height:34px; color:#fff;}
#menu li a:hover b,
#menu li a:active b,
#menu li a:focus b,
.home #menu li#home a b,
.single #menu li#single a b,
.dropdown #menu li#dropdown a b,
.dropline #menu li#dropline a b,
.flyout #menu li#flyout a b,
.support #menu li#support a b,
.contact #menu li#contact a b
{background-position:left -36px;}
</style>
</head>
<body>
<ul id="menu">
<li id="home"><a href="index.html"><b>Home</b></a></li>
<li id="single"><a href="single.html"><b>Single Level</b></a></li>
<li id="dropdown"><a href="dropdown.html"><b>Dropdown</b></a></li>
<li id="dropline"><a href="dropline.html"><b>Dropline</b></a></li>
<li id="flyout"><a href="flyout.html"><b>Flyout</b></a></li>
<li id="support"><a href="support.html"><b>Support</b></a></li>
</ul>
</body>
</html>
Artikel Terkait
0 komentar
Posting Komentar