js+div+css下拉导航菜单完整代码

效果预览:http://keleyi.com/keleyi/phtml/menu/1.htm

js+div+css下拉导航菜单完整代码_第1张图片

js+div+css下拉导航菜单完整代码:

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下拉菜单导航--柯乐义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中substringa><br />
<a href="http://keleyi.com/a/bjac/ff33a0656183eba.htm" target="_blank">客户端代码着色a><br />
<a href="http://keleyi.com/a/bjac/6e893bbacf5184f3.htm" target="_blank">js实现代码着色a><br />
<a href="http://keleyi.com/a/bjac/21e2e5321077656f.htm" target="_blank">11个js技巧a><br />
<a href="http://keleyi.com/a/bjac/d32ac9822ef75ef9.htm" target="_blank">tab切换样式a><br />
<a href="http://keleyi.com/a/bjac/fca5ac722271d2d5.htm" target="_blank">js获取可见域宽a><br />
<a href="http://keleyi.com/a/bjac/ade2f3941bd75ba.htm" target="_blank">js导航菜单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">左侧可弹出diva><br />
<a href="http://keleyi.com/a/bjac/d863921ed93d03ff.htm" target="_blank">jquery修改a标签a><br />
<a href="http://keleyi.com/a/bjac/6f008786225269ac.htm" target="_blank">纯文本返回顶部a><br />
<a href="http://keleyi.com/a/bjac/ac398357acb82782.htm" target="_blank">jquery倒计时a><br />
<a href="http://keleyi.com/a/bjac/88af29335890a287.htm" target="_blank">div(tab)切换a><br />
<a href="http://keleyi.com/a/bjac/2041333085cb032d.htm" target="_blank">选项卡切换a><br />
<a href="http://keleyi.com/a/bjac/768f469b95b61487.htm" target="_blank">单行文字滚动a><br />
<a href="http://keleyi.com/a/bjac/ed5eb8c2959c619e.htm" title="滚动页面时DIV到达顶部时固定在顶部" target="_blank">DIV到顶固定a><br />
<a href="http://keleyi.com/a/bjac/a6d651710217f7a0.htm" title="使用jQuery UI修饰title属性的气泡悬浮框" target="_blank">修饰title气泡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">删除文本空白行a><br />
<a href="http://keleyi.com/a/bjac/94190f87387a868a.htm" target="_blank">生成图片验证码a><br />
<a href="http://keleyi.com/a/bjac/954abc0d69092dc1.htm" title=".NET生成固定长度的唯一字符串(以8位为例)" target="_blank">生成唯一字符串a><br />
<a href="http://keleyi.com/a/bjac/c4dd6879a4a4fb36.htm" target="_blank">向文件写入文本a><br />
<a href="http://keleyi.com/a/bjac/d09a76fa32100d7.htm" target="_blank">用IgnoreRoute忽略路径a><br />
<a href="http://keleyi.com/a/bjac/84d4e8554b88f61.htm" target="_blank">RouteCollection类a><br />
<a href="http://keleyi.com/a/bjac/c8e988b2eb520f4b.htm" target="_blank">柯乐义图片压缩类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更新a><br />
<a href="http://keleyi.com/a/bjac/2916901353b081f1.htm" target="_blank">柯乐义留言板介绍a>
div>
li>
ul>
div>

body>
html>

本文转载自柯乐义:http://keleyi.com/a/bjac/ecb91bca21b61245.htm

你可能感兴趣的:(js+div+css下拉导航菜单完整代码)