一个用纯CSS制作的网页下拉菜单

王朝html/css/js·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"

[ <!ELEMENT a (#PCDATA | table)* > ]>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<head>

<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />

<title> Drop Down Menu </title>

<style type="text/css">

body {font-size:1%; color:#fff;} /*get rid of the IE bug that prints the the end of the !doctype */

.menu {display:none;}

.holder {color:#000; width:90px; height:18px; display:block; background:#dca; border:1px solid #000; margin-right:1px; text-align:center; float:left; text-decoration:none; font-family:tahoma, vardana, arial, sans-serif; font-size:10px; line-height:18px; overflow:hidden;}

.holder:hover {height:auto; cursor:pointer;color:#fff; background:#000;}

a.inner, a.inner:visited {display:block; width:89px; height:18px; border-bottom:1px solid #000; text-decoration:none; color:#000; background:#eee;}

a.inner:hover {background:#add;}

p { color:#000; font-size:16px;}

</style>

<!--[if IE]>

<style type="text/css">

/*<![CDATA[*/

.holder {display:none;}

.menu {display:block;}

a.outer, a.outer:visited {color:#000; width:90px; height:18px; display:block; background:#dca; border:1px solid #000; margin-right:1px; text-align:center; float:left; text-decoration:none; font-family:tahoma, vardana, arial, sans-serif; font-size:10px; line-height:18px; overflow:hidden;}

a.outer:hover {color:#fff; background:#000; overflow:visible;}

a.outer:hover table {display:block; background:#eee; border-collapse:collapse;}

a.inner, a.inner:visited {display:block; width:88px; height:18px; border-bottom:1px solid #000; text-decoration:none; color:#000;font-family:tahoma, vardana, arial, sans-serif; font-size:10px; text-align:center;}

a.inner:hover {background:#add;}

/*]]>*/

</style>

<![endif]-->

</head>

<body>

<div class="menu">

<a class="outer" href="page1.html">MENU 1

<table><tr><td>

<a class="inner" href="page1a.html">Page 1a</a>

<a class="inner" href="page1b.html">Page 1b</a>

<a class="inner" href="page1c.html">Page 1c</a>

<a class="inner" href="page1d.html">Page 1d</a>

<a class="inner" href="page1e.html">Page 1e</a>

</td></tr></table>

</a>

<a class="outer" href="page1.html">MENU 2

<table><tr><td>

<a class="inner" href="page2a.html">Page 2a</a>

<a class="inner" href="page2b.html">Page 2b</a>

<a class="inner" href="page2c.html">Page 2c</a>

<a class="inner" href="page2d.html">Page 2d</a>

</td></tr></table>

</a>

</div>

<div class="holder">

MENU 1<br />

<a class="inner" href="page1a.html">Page 1a</a>

<a class="inner" href="page1b.html">Page 1b</a>

<a class="inner" href="page1c.html">Page 1c</a>

<a class="inner" href="page1d.html">Page 1d</a>

<a class="inner" href="page1e.html">Page 1e</a>

</div>

<div class="holder">

MENU 2<br />

<a class="inner" href="page2a.html">Page 2a</a>

<a class="inner" href="page2b.html">Page 2b</a>

<a class="inner" href="page2c.html">Page 2c</a>

<a class="inner" href="page2d.html">Page 2d</a>

</div>

</body>

</html>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航