CSS+XHTML極酷導覽功能表

來源:互聯網
上載者:User

<style type="text/css">
 body {
 background: #fff;
 font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
 font-size: 12px;
}
.menu {
font-family: tahoma, geneva, "lucida sans unicode", "lucida grande",verdana, sans-serif;
width:500px;
height:355px;
background:#fff url(/jscss/demoimg/200906/meeting.jpg) 0 20px no-repeat;
position:relative;
margin:2em 125px 0 125px;
font-family: tahoma, geneva, "lucida sans unicode", "lucida grande",verdana, sans-serif;
}
.menu ul {
padding:0;
margin:0;
list-style-type: none;
}

.menu ul li {
float:left;
position:relative;
}
/* set up www.codefans.net */
.menu ul li a, .menu ul li a:visited {
display:block;
text-decoration:none;
color:#000;
width:88px;
height:1.5em;
font-weight:bold;
color:#888;
border-bottom:8px solid #888;
background:#fff;
padding-left:10px;
line-height:1.5em;
margin-right:2px;
}
/* hack for IE5.5 to correct the faulty box model */
* html .menu ul li a, .menu ul li a:visited {
width:98px;
w\idth:88px;
}
/* hide the drop down menu */
.menu ul li ul {
display: none;
}
/* www.codefans.net remove all table style so that it does not interfere with the menu */
.menu table {
margin:-1px;
border-collapse:collapse;
font-size:1em;
}

.menu ul li:hover a,
.menu ul li a:hover {
color:#000;
border-bottom:8px solid #606;
}
/* make the drop down menu show www.codefans.net */
.menu ul li:hover ul,
.menu ul li a:hover ul {
display:block;
position:absolute;
top:1.2em;
margin-top:11px;
left:0;
width:96px;
border:1px solid #888;
border-top:0;
background:transparent;
}
/* style the drop down links with no hover www.codefans.net */
.menu ul li:hover ul li a,
.menu ul li a:hover ul li a {
display:block;
color:#000;
border:0;
margin:0;
color:#333;
font-weight:normal;
font-size:0.9em;
height:auto;
line-height:1em;
padding:5px;
width:86px
}
.menu ul li:hover ul li a:hover,
.menu ul li a:hover ul li a:hover {
background:#888;
color:#fff;
}

.menu ul li a:hover ul {
background:transparent filter: alpha(opacity=80);
 filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80);
opacity:0.8;
margin-top:10px;
marg\in-top:11px;
}
.menu ul li a:hover ul li a {
background:#ddd;
width:96px;
w\idth:86px;
}

p.strike {text-decoration:line-through;}
</style>

---------------------------------------------------------

<div class="menu">

<ul>
<li><a class="drop" href="/">源碼愛好者<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
 <ul>
 <li><a href="/" title="Wrapping text around images">Codefans.NET</a></li>
 <li><a href="http://codefans.net" title="Styling forms">CODEFANS.NET</a></li>
 <li><a href="/" title="Removing active/focus borders">Active</a></li>
 </ul>
</td></tr></table>
<!--[if lte IE 6]></a><![endif]-->
</li>

<li><a href="/">盒子<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
 <ul>
 <li><a href="/" title="a coded list of spies">Box</a></li>
 <li><a href="http://codefans.net" title="a horizontal vertical menu">水平菜單</a></li>
 </ul>
</td></tr></table>
<!--[if lte IE 6]></a><![endif]-->
</li>

<li><a href="/">Firefox<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
 <ul>
 <li><a href="http://codefans.net" title="A drop down menu">IT技術</a></li>
 <li><a href="/" title="A cascading menu">SOHO一族</a></li>
 <li><a href="http://codefans.net" title="Snooker cue">月光無限</a></li>
 </ul>
</td></tr></table>
<!--[if lte IE 6]></a><![endif]-->
</li>

<li><a href="/">Explorer<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
 <ul>
 <li><a href="http://codefans.net" title="Weft fonts">CSS技術</a></li>
 <li><a href="/" title="Vertical align">防火牆</a></li>
 </ul>
</td></tr></table><!--[if lte IE 6]></a><![endif]-->
</li>

<li><a href="../opacity/index.html">示範<!--[if IE 7]><!--></a><!--<![endif]-->
<table><tr><td>
 <ul>
 <li><a href="/" title="colour wheel">菜單樣本</a></li>
 <li><a href="http://codefans.net" title="a menu using opacity">Ajax技術</a></li>
 <li><a href="/" title="partial opacity">網站菜單</a></li>
 </ul>
</td></tr></table>
<!--[if lte IE 6]></a><![endif]-->
</li>
</ul>
</div>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.