DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> CSS入門知識 >> CSS詳解 >> 一個用純CSS制作的網頁下拉菜單
一個用純CSS制作的網頁下拉菜單
編輯:CSS詳解     

<!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>

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved