导航栏下拉菜单怎么做 导航栏下拉菜单怎么做 就实现个下来的功能就可以了 最好是js源码 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在网页head区加入样式定义:<style type="text/css">/* ================================================================ This copyright notice must be untouched at all times.The original version of this stylesheet and the associated (x)htmlis available at http://www.cssplay.co.uk/menus/drop_definition3.htmlCopyright (c) 2005-2007 Stu Nicholls. All rights reserved.This stylesheet and the assocaited (x)html may be modified in any way to fit your requirements.=================================================================== */#menu {list-style-type:none; margin:40px auto 100px auto; padding:0; width:608px;}#menu li {float:left; padding:0; margin:0 1px 0 0; position:relative; width:150px; height:3em; z-index:100;}#menu li dl {position:absolute; top:0; left:0; padding-bottom:0;}#menu li a, #menu li a:visited {text-decoration:none;}#menu li dd {display:none;}#menu li a:hover {border:0;}#menu li:hover dd, #menu li a:hover dd {display:block;}#menu li:hover dl, #menu li a:hover dl {padding-bottom:10px;}#menu table {border-collapse:collapse; padding:0; margin:-1px; font-size:1em;}#menu dl {width: 150px; margin: 0; padding: 0; background: transparent;}#menu dt {margin:0; padding: 0;}#menu dd {margin:0; padding:0; color: #fff; font-size: 1em; text-align:left;}#menu dt a, #menu dt a:visited {display:block; font-size: 0.9em; color: #038; text-align:center; border:1px solid #08c; border-width:0 1px 1px 1px; background:#d4d4d4; padding:0.25em 0 0.75em 0;}#menu li:hover dt a, #menu a:hover dt a {color:#006; background:#ddd; border:1px solid #08c; border-width:0 1px 1px 1px;}#menu dd a, #menu dd a:visited {background:#08c; color:#fff; padding:0.5em 0; text-decoration:none; display:block; text-align:center; border-left:1px solid #08c; border-right:1px solid #08c;}#menu dd a:hover {background: #ddd; color:#000; border-left:1px solid #08c; border-right:1px solid #08c;}#menu b {display:block; overflow:hidden; height:1px;}#menu b.p1 {background:#08c; margin:0 5px;}#menu b.p2 {background:#d4d4d4; border:2px solid #08c; border-width:0 2px; margin:0 3px;}#menu b.p3 {background:#d4d4d4; margin:0 2px; border:1px solid #08c; border-width:0 1px;}#menu b.p4 {height:2px; background:#d4d4d4; margin:0 1px; border:1px solid #08c; border-width:0 1px;}#menu b.p5 {background:#08c; margin:0 5px;}#menu b.p6 {background:#08c; margin:0 3px;}#menu b.p7 {background:#08c; margin:0 2px;}#menu b.p8 {height:2px; background:#08c; margin:0 1px;}#menu li:hover b.p2, #menu a:hover b.p2 {background:#fff;}#menu li:hover b.p3, #menu a:hover b.p3 {background:#f0f0f0;}#menu li:hover b.p4, #menu a:hover b.p4 {background:#e8e8e8;}</style>在网页<body>区添加菜单HTML代码:<ul id="menu"><li><!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]--><dl> <dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="../menu/index.html">DEMOS</a></dt> <dd><a href="http://www.sharejs.com" title="The zero dollar ads page">zero dollars</a></dd> <dd><a href="../menu/embed.html" title="Wrapping text around images">wrapping text</a></dd> <dd><a href="../menu/form.html" title="Styling forms">styled form</a></dd> <dd><a href="../menu/nodots.html" title="Removing active/focus borders">active focus</a></dd> <dd><a href="../menu/shadow_boxing.html" title="Multi-position drop shadow">shadow boxing</a></dd> <dd><a href="../menu/old_master.html" title="Image Map for detailed information">image map</a></dd> <dd><a href="../menu/bodies.html" title="fun with background images">fun with backgrounds</a></dd> <dd><a href="../menu/fade_scroll.html" title="fade-out scrolling">fade scrolling</a></dd> <dd><a href="../menu/em_images.html" title="em size images compared">em sized images</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd></dl><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]--><dl> <dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="index.html">MENUS</a></dt> <dd><a href="spies.html" title="a coded list of spies">spies menu</a></dd> <dd><a href="vertical.html" title="a horizontal vertical menu">vertical menu</a></dd> <dd><a href="expand.html" title="an enlarging unordered list">enlarging list</a></dd> <dd><a href="enlarge.html" title="an unordered list with link images">link images</a></dd> <dd><a href="cross.html" title="non-rectangular links">non-rectangular links</a></dd> <dd><a href="jigsaw.html" title="jigsaw links">jigsaw links</a></dd> <dd><a href="circles.html" title="circular links">circular links</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd></dl><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]--><dl> <dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="../layouts/index.html">LAYOUTS</a></dt> <dd><a href="../layouts/bodyfix.html" title="Cross browser fixed layout">Fixed 1</a></dd> <dd><a href="../layouts/body2.html" title="Cross browser fixed layout">Fixed 2</a></dd> <dd><a href="../layouts/body4.html" title="Cross browser fixed layout">Fixed 3</a></dd> <dd><a href="../layouts/body5.html" title="Cross browser fixed layout">Fixed 4</a></dd> <dd><a href="../layouts/minimum.html" title="A simple minimum width layout">minimum width for Internet Explorer</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd></dl><!--[if lte IE 6]></td></tr></table></a><![endif]--></li><li><!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]--><dl> <dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="../mozilla/index.html">MOZILLA</a></dt> <dd><a href="../mozilla/dropdown.html" title="A drop down menu">drop down menu</a></dd> <dd><a href="../mozilla/cascade.html" title="A cascading menu">cascading menu</a></dd> <dd><a href="../mozilla/content.html" title="Using content:">content:</a></dd> <dd><a href="../mozilla/moxbox.html" title=":hover applied to a div">mozzie box</a></dd> <dd><a href="../mozilla/rainbow.html" title="I can build a rainbow">rainbow box</a></dd> <dd><a href="../mozilla/snooker.html" title="Snooker cue">snooker cue made using border art</a></dd> <dd><a href="../mozilla/target.html" title="Target Practise">target practise</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd></dl><!--[if lte IE 6]></td></tr></table></a><![endif]--></li></ul><br class="clear" /> <div><div oumouseover="document.getElementById('items').style.display='block'"onmouseout="document.getElementById('items').style.display=''">下拉菜单<div><div id="items"><li style="list-style-type:none">下拉菜单一</li><li style="list-style-type:none">下拉菜单一</li><li style="list-style-type:none">下拉菜单一</li><li style="list-style-type:none">下拉菜单一</li></div><div>大概就是这个样子。 javamail 在jsp页面上显示问题 学习jsp时遇到的问题,想请教大家 求助:jsp中div中加载大图片,div偏移 FCKeditor 图片内容问题 关于在JSP里使用STRING.FORMAT的问题 为什么jsp与mysql连接后过段时间就取不出数据?????? 请教:jsp页面内实现动态下拉框!! 如何判断add的操作 mysql5.1的默认连接用户名和密码是多少? 怎么才能把用word写的简历转变成为web的形式呢? 三星笔记本的问题 tomcat能启动但不能打开tomcat主界面
<style type="text/css">
/* ================================================================
This copyright notice must be untouched at all times.The original version of this stylesheet and the associated (x)html
is available at http://www.cssplay.co.uk/menus/drop_definition3.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This stylesheet and the assocaited (x)html may be modified in any
way to fit your requirements.
=================================================================== */
#menu {list-style-type:none; margin:40px auto 100px auto; padding:0; width:608px;}
#menu li {float:left; padding:0; margin:0 1px 0 0; position:relative; width:150px; height:3em; z-index:100;}
#menu li dl {position:absolute; top:0; left:0; padding-bottom:0;}
#menu li a, #menu li a:visited {text-decoration:none;}
#menu li dd {display:none;}
#menu li a:hover {border:0;}
#menu li:hover dd, #menu li a:hover dd {display:block;}
#menu li:hover dl, #menu li a:hover dl {padding-bottom:10px;}
#menu table {border-collapse:collapse; padding:0; margin:-1px; font-size:1em;}
#menu dl {width: 150px; margin: 0; padding: 0; background: transparent;}
#menu dt {margin:0; padding: 0;}#menu dd {margin:0; padding:0; color: #fff; font-size: 1em; text-align:left;}#menu dt a, #menu dt a:visited {display:block; font-size: 0.9em; color: #038; text-align:center; border:1px solid #08c; border-width:0 1px 1px 1px; background:#d4d4d4; padding:0.25em 0 0.75em 0;}#menu li:hover dt a, #menu a:hover dt a {color:#006; background:#ddd; border:1px solid #08c; border-width:0 1px 1px 1px;}#menu dd a, #menu dd a:visited {background:#08c; color:#fff; padding:0.5em 0; text-decoration:none; display:block; text-align:center; border-left:1px solid #08c; border-right:1px solid #08c;}#menu dd a:hover {background: #ddd; color:#000; border-left:1px solid #08c; border-right:1px solid #08c;}#menu b {display:block; overflow:hidden; height:1px;}#menu b.p1 {background:#08c; margin:0 5px;}
#menu b.p2 {background:#d4d4d4; border:2px solid #08c; border-width:0 2px; margin:0 3px;}
#menu b.p3 {background:#d4d4d4; margin:0 2px; border:1px solid #08c; border-width:0 1px;}
#menu b.p4 {height:2px; background:#d4d4d4; margin:0 1px; border:1px solid #08c; border-width:0 1px;}
#menu b.p5 {background:#08c; margin:0 5px;}
#menu b.p6 {background:#08c; margin:0 3px;}
#menu b.p7 {background:#08c; margin:0 2px;}
#menu b.p8 {height:2px; background:#08c; margin:0 1px;}#menu li:hover b.p2, #menu a:hover b.p2 {background:#fff;}
#menu li:hover b.p3, #menu a:hover b.p3 {background:#f0f0f0;}
#menu li:hover b.p4, #menu a:hover b.p4 {background:#e8e8e8;}
</style>在网页<body>区添加菜单HTML代码:
<ul id="menu">
<li>
<!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]-->
<dl>
<dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="../menu/index.html">DEMOS</a></dt>
<dd><a href="http://www.sharejs.com" title="The zero dollar ads page">zero dollars</a></dd>
<dd><a href="../menu/embed.html" title="Wrapping text around images">wrapping text</a></dd>
<dd><a href="../menu/form.html" title="Styling forms">styled form</a></dd>
<dd><a href="../menu/nodots.html" title="Removing active/focus borders">active focus</a></dd>
<dd><a href="../menu/shadow_boxing.html" title="Multi-position drop shadow">shadow boxing</a></dd>
<dd><a href="../menu/old_master.html" title="Image Map for detailed information">image map</a></dd>
<dd><a href="../menu/bodies.html" title="fun with background images">fun with backgrounds</a></dd>
<dd><a href="../menu/fade_scroll.html" title="fade-out scrolling">fade scrolling</a></dd>
<dd><a href="../menu/em_images.html" title="em size images compared">em sized images</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd>
</dl>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li>
<!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]-->
<dl>
<dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="index.html">MENUS</a></dt>
<dd><a href="spies.html" title="a coded list of spies">spies menu</a></dd>
<dd><a href="vertical.html" title="a horizontal vertical menu">vertical menu</a></dd>
<dd><a href="expand.html" title="an enlarging unordered list">enlarging list</a></dd>
<dd><a href="enlarge.html" title="an unordered list with link images">link images</a></dd>
<dd><a href="cross.html" title="non-rectangular links">non-rectangular links</a></dd>
<dd><a href="jigsaw.html" title="jigsaw links">jigsaw links</a></dd>
<dd><a href="circles.html" title="circular links">circular links</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd>
</dl>
<!--[if lte IE 6]></td></tr></table></a><![endif]--></li>
<li>
<!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]-->
<dl>
<dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="../layouts/index.html">LAYOUTS</a></dt>
<dd><a href="../layouts/bodyfix.html" title="Cross browser fixed layout">Fixed 1</a></dd>
<dd><a href="../layouts/body2.html" title="Cross browser fixed layout">Fixed 2</a></dd>
<dd><a href="../layouts/body4.html" title="Cross browser fixed layout">Fixed 3</a></dd>
<dd><a href="../layouts/body5.html" title="Cross browser fixed layout">Fixed 4</a></dd>
<dd><a href="../layouts/minimum.html" title="A simple minimum width layout">minimum width for Internet Explorer</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd>
</dl>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li>
<!--[if lte IE 6]><a href="#nogo"><table><tr><td><![endif]-->
<dl>
<dt><b class="p1"></b><b class="p2"></b><b class="p3"></b><b class="p4"></b><a href="../mozilla/index.html">MOZILLA</a></dt>
<dd><a href="../mozilla/dropdown.html" title="A drop down menu">drop down menu</a></dd>
<dd><a href="../mozilla/cascade.html" title="A cascading menu">cascading menu</a></dd>
<dd><a href="../mozilla/content.html" title="Using content:">content:</a></dd>
<dd><a href="../mozilla/moxbox.html" title=":hover applied to a div">mozzie box</a></dd>
<dd><a href="../mozilla/rainbow.html" title="I can build a rainbow">rainbow box</a></dd>
<dd><a href="../mozilla/snooker.html" title="Snooker cue">snooker cue made using border art</a></dd>
<dd><a href="../mozilla/target.html" title="Target Practise">target practise</a><b class="p8"></b><b class="p7"></b><b class="p6"></b><b class="p5"></b></dd>
</dl>
<!--[if lte IE 6]></td></tr></table></a><![endif]--></li>
</ul><br class="clear" />
<div>
<div oumouseover="document.getElementById('items').style.display='block'"
onmouseout="document.getElementById('items').style.display=''">下拉菜单<div>
<div id="items">
<li style="list-style-type:none">下拉菜单一</li>
<li style="list-style-type:none">下拉菜单一</li>
<li style="list-style-type:none">下拉菜单一</li>
<li style="list-style-type:none">下拉菜单一</li>
</div>
<div>大概就是这个样子。