The js+div+css dropdown navigation menus complete code

Preview:

下拉菜单

The js+div+css dropdown navigation menus complete code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Css+div+js drop-down menu navigation -- Ke Leyi</title>
<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
body{padding:0;margin:0;font-size:12px;color:#fff;font-family:arial, helvetica, sans-serif;background:#fff;}
#nav{padding:0 5px;z-index:1;left:298px;width:600px;position:absolute;top:175px;height:30px;}
#nav li{float:left;text-align:center;}
#nav li a{float:left;width:100px;color:#336601;text-decoration:none;padding:3px 5px 0 5px;}
#nav li a:hover{float:left;width:88px;color:#fff;background:#539d26;text-decoration:none;padding:3px 3px 0 20px;}
.list{font-weight:normal;line-height:20px;text-align:left;padding:4px;}
.menu1{border:#9cdd75 1px solid;overflow-y:hidden;margin:6px 4px 0px 0px;width:120px;cursor:pointer;color:#336601;padding-top:6px;background:#f1fbec;moz-opacity:0.7;filter:alpha(opacity=70);opacity:0.7;}
.menu2{border:#eee8dd 1px solid;overflow-y:hidden;margin:6px 4px 0px 0px;width:120px;cursor:pointer;color:#999;padding-top:6px;height:18px;background:#f5f5f5;}
</style>
</head>
<body>
<div id="nav">
<ul>
<li onmouseout="this.className='menu2'" onmouseover="this.className='menu1'" class="menu2">Javascript
<div class="list">
<a href="http://keleyi.com/a/bjac/687f154f53ab3aef.htm" target="_blank">JS substring</a><br />
<a href="http://keleyi.com/a/bjac/ff33a0656183eba.htm" target="_blank">The client code coloring</a><br />
<a href="http://keleyi.com/a/bjac/6e893bbacf5184f3.htm" target="_blank">JS implementation code coloring</a><br />
<a href="http://keleyi.com/a/bjac/21e2e5321077656f.htm" target="_blank">11 JS skills</a><br />
<a href="http://keleyi.com/a/bjac/d32ac9822ef75ef9.htm" target="_blank">Tab switching style</a><br />
<a href="http://keleyi.com/a/bjac/fca5ac722271d2d5.htm" target="_blank">JS gets the visible width</a><br />
<a href="http://keleyi.com/a/bjac/ade2f3941bd75ba.htm" target="_blank">JS navigation menu</a>
</div>
</li>
<li onmouseout="this.className='menu2'" onmouseover="this.className='menu1'" class="menu2">jQuery
<div class="list">
<a href="http://keleyi.com/a/bjac/13639353acde40c.htm" target="_blank">Left pop div</a><br />
<a href="http://keleyi.com/a/bjac/d863921ed93d03ff.htm" target="_blank">JQuery modify a Tags</a><br />
<a href="http://keleyi.com/a/bjac/6f008786225269ac.htm" target="_blank">Plain text back to top</a><br />
<a href="http://keleyi.com/a/bjac/ac398357acb82782.htm" target="_blank">JQuery countdown</a><br />
<a href="http://keleyi.com/a/bjac/88af29335890a287.htm" target="_blank">div(tab)Switching</a><br />
<a href="http://keleyi.com/a/bjac/2041333085cb032d.htm" target="_blank">Tab to switch</a><br />
<a href="http://keleyi.com/a/bjac/768f469b95b61487.htm" target="_blank">Single line text scroll</a><br />
<a href="http://keleyi.com/a/bjac/ed5eb8c2959c619e.htm" title="Scroll page DIV to reach the top is fixed at the top" target="_blank">DIV top fixed</a><br />
<a href="http://keleyi.com/a/bjac/a6d651710217f7a0.htm" title="Air bubbles suspended using jQuery UI modified title attribute frame" target="_blank">Modified Title Bubble</a>
</div>
</li>
<li onmouseout="this.className='menu2'" onmouseover="this.className='menu1'" class="menu2">C#
<div class="list">
<a href="http://keleyi.com/a/bjac/e3ce4526c3fcaf8f.htm" target="_blank">Delete the text blank line</a><br />
<a href="http://keleyi.com/a/bjac/94190f87387a868a.htm" target="_blank">Generated image verification code</a><br />
<a href="http://keleyi.com/a/bjac/954abc0d69092dc1.htm" title="The.NET generates a unique fixed length strings (8 case)" target="_blank">Generates a unique string</a><br />
<a href="http://keleyi.com/a/bjac/c4dd6879a4a4fb36.htm" target="_blank">Write text to a file</a><br />
<a href="http://keleyi.com/a/bjac/d09a76fa32100d7.htm" target="_blank">IgnoreRoute ignored path</a><br />
<a href="http://keleyi.com/a/bjac/84d4e8554b88f61.htm" target="_blank">The RouteCollection class</a><br />
<a href="http://keleyi.com/a/bjac/c8e988b2eb520f4b.htm" target="_blank">Ke to image compression</a>
</div>
</li>
<li onmouseout="this.className='menu2'" onmouseover="this.className='menu1'" class="menu2">CMS
<div class="list"><a href="http://keleyi.com/a/bjac/9d5534156d5814fc.htm" target="_blank">KeleyiCMS update</a><br />
<a href="http://keleyi.com/a/bjac/2916901353b081f1.htm" target="_blank">Ke to message board paper</a>
</div>
</li>
</ul>
</div>

</body>
</html>

This article reprinted from Ke to

Posted by Rory at November 19, 2013 - 12:39 PM