当前位置:Gxlcms > html代码 > 一个导航无法实现下拉的全部栏目,求高手帮忙!万分感谢_html/css_WEB-ITnose

一个导航无法实现下拉的全部栏目,求高手帮忙!万分感谢_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:33人阅读

http://www.fzsgsl.gov.cn/

http://d.lanrentuku.com/down/js/daohang-928/

正确的本来是这样的,不知道导航的栏目下面一排为何出不来,请各位大哥帮我调试一下~








这是head.htm文件



{dede:global.cfg_webname/}








这是CSS


/*---------------------页面基础定义----------------------------------*/body,td,th {	font-family: Tahoma, Verdana, Arial, sans-serif;	font-size: 12px;	color: #333333;}body {	margin-left: 0px;	margin-top: 0px;	margin-right: 0px;	margin-bottom: 0px;}/*---------------------链接定义----------------------------------*/a {	color: #333333;	text-decoration: none;}a:hover {	color: #FF0000;	text-decoration: none;}a:active{	color: #FF0000;	text-decoration: none;}/*---------------------菜单样式----------------------------------*/#menu{	height:32px;	margin-top:8px; background-color:#990000;}#menu ul{	margin:auto; width:778px; height:32px;	list-style-type:none; padding:0px; margin-top:0px; margin-bottom:0px;}.m_li{	float:left; width:114px; line-height:32px;  text-align:center; margin-right:-2px; margin-left:-2px;}.m_li a{	display:block; color:#FFFFFF; width:114px;}.m_line{	float:left; width:1px; height:32px;	line-height:32px;   /*ff下有效(图片垂直居中)*/}.m_line img{	margin-top:expression(( 32 - this.height ) / 2);   /*ie下有效(图片垂直居中)*/}.m_li_a{	float:left; width:114px; line-height:32px; text-align:center; padding-top:3px; font-weight:bold;	background-image:url(../images/menu_bg.jpg); position:relative; height:32px; margin-top:-3px; margin-right:-2px; margin-left:-2px;}.m_li_a a{	display:block; color:#FF0000; width:114px;}.smenu{	width:774px; margin:0px auto 0px auto; padding:0px; list-style-type:none; height:32px;}.s_li{	line-height:32px; width:auto; display:none; height:32px; }.s_li_a{	line-height:32px; width:auto; display:block; height:32px; }


回复讨论(解决方案)

按照我的思路,这个问题必须用到js,首先将下拉的菜单全部设置成隐藏的,并且对每个菜单进行相对定位,然后用js实现点击出现或者是鼠标经过出现,这里还会涉及到DOM技术---getElementById()的用法。

按照我的思路,这个问题必须用到js,首先将下拉的菜单全部设置成隐藏的,并且对每个菜单进行相对定位,然后用js实现点击出现或者是鼠标经过出现,这里还会涉及到DOM技术---getElementById()的用法。

按照我的思路,这个问题必须用到js,首先将下拉的菜单全部设置成隐藏的,并且对每个菜单进行相对定位,然后用js实现点击出现或者是鼠标经过出现,这里还会涉及到DOM技术---getElementById()的用法。

人气教程排行