日期:2014-05-20  浏览次数:20526 次

求一段鼠标放上去后弹出下拉菜单的JS代码,要精简的代码,附加上说明.回答者60,其它的分,顶者分
我的顶级菜单是一个图片.

------解决方案--------------------
http://community.csdn.net/Index.htm
这个页面源文件内有。
------解决方案--------------------
帮你顶
------解决方案--------------------
顶一下


------解决方案--------------------
http://dev.csdn.net/article/21/21011.shtm

http://goowind.com/Tech/42/Detail_11709_1/
------解决方案--------------------
顶一个,接分。
------解决方案--------------------

------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " " <a href= "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " target= "_blank "> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd </a> ">
<html xmlns= " <a href= "http://www.w3.org/1999/xhtml " target= "_blank "> http://www.w3.org/1999/xhtml </a> ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<style type= "text/css ">
<!--
body{
margin-top:0px;
margin-bottom:0px;
margin-left:auto;
margin-right:auto;
background:#fff;
text-align:center;
color: #333;
font-family:arial,verdana,sans-serif;
}

#topbanner{
margin-left:auto;
margin-right:auto;
width:580px;
height:40px;
border-bottom:5px solid #ff9900;
}

#bottom{
margin-left:auto;
margin-right:auto;
width:580px;
height:40px;
border-top:5px solid #ff9900;
}

/*菜单样式定义*/
#menu{
clear:both;
margin-right: auto;
margin-left: auto;
width:580px;
height:24px;
color:#fff;
background-color:#900;
}

/*主菜单样式定义*/
.mainmenu{
float:left;
width:64px;
font-size:13px;
color:#fff;
border-left:1px solid #999;
}

.menucontent{
float:left;
width:80px;
height:20px;
color:#fff;
padding-top:4px;
}

.menucontent a:link {
color: #fff;
display:block;
text-decoration: none;
}

.menucontent a:visited {
color: #fff;
display:block;
text-decoration: none;
}

.menucontent a:hover {
color: #fff;
text-decoration: none;
background-color:#000;
}

/*子菜单样式定义*/
.submenu{
clear:both;
float:left;
position:absolute;
width:80px;
padding:0px;
font-size:13px;
}

.submenu ul {
background-color:#eee;
list-style-type:none;
width:82px;
line-height:24px;
}

.submenu li {
border-bottom: #ccc 1px dotted;
}

.submenu li a:link,a:visited {
color: #333;
display: block;
text-decoration: none;
}

.submenu li a:hover {
color: #fff;
text-decoration: none;
background-color:#900;
border-top:1px solid #fff;
}
-->
</style>
</head>

<body>
<div id= "topbanner "> </div>
<div id= "menu ">

<div class= "mainmenu " onmouseover= "submenu1.style.display= 'block ' " onmouseout= "submenu1.style.display= 'none ' ">