js+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> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>js+css制作漂亮实用红色风格导航菜单_武鸣人</title> <style> 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_wuming_ren{ height:32px; margin-top:8px; background-color:#990000; } #menu_wuming_ren ul{ margin:auto; width:778px; height:32px; list-style-type:none; padding:0px; margin-top:0px; margin-bottom:0px; } .m_li_wuming{ float:left; width:114px; line-height:32px; text-align:center; margin-right:-2px; margin-left:-2px; } .m_li_wuming a{ display:block; color:#FFFFFF; width:114px; } .m_line_wuming_ren{ float:left; width:1px; height:32px; line-height:32px; /*ff下有效(图片垂直居中)*/ } .m_line_wuming_ren img{ margin-top:expression(( 32 - this.height ) / 2); /*ie下有效(图片垂直居中)*/ } .m_li_on_wuming_ren{ float:left; width:114px; line-height:32px; text-align:center; padding-top:3px; font-weight:bold; background-image:url(/img/20240420_www_wuming_ren_13.jpg); position:relative; height:32px; margin-top:-3px; margin-right:-2px; margin-left:-2px; } .m_li_on_wuming_ren a{ display:block; color:#FF0000; width:114px; } .smenu_wuming_ren{ width:774px; margin:0px auto 0px auto; padding:0px; list-style-type:none; height:32px; } .s_li_wuming{ line-height:32px; width:auto; display:none; height:32px; } .s_li_a_wuming{ line-height:32px; width:auto; display:block; height:32px; } </style> <script> //初始化 var def = "1"; function mover_wuming(object) { //主菜单 var mm = document.getElementById("m_" + object); mm.className = "m_li_on_wuming_ren"; //初始主菜单隐藏效果 if (def != 0) { var mdef = document.getElementById("m_" + def); mdef.className = "m_li_wuming"; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) //子菜单 var ss = document.getElementById("s_" + object); ss.style.display = "block"; //初始子菜单隐藏效果 if (def != 0) { var sdef = document.getElementById("s_" + def); sdef.style.display = "none"; } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function mout_wuming_ren(object) { //主菜单 var mm = document.getElementById("m_" + object); mm.className = "m_li_wuming"; //初始主菜单 if (def != 0) { var mdef = document.getElementById("m_" + def); mdef.className = "m_li_on_wuming_ren"; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) //子菜单 var ss = document.getElementById("s_" + object); ss.style.display = "none"; //初始子菜单 if (def != 0) { var sdef = document.getElementById("s_" + def); sdef.style.display = "block"; } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </script> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <div id="menu_wuming_ren"> <ul> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> <li id="m_1" class='m_li_on_wuming_ren'><a href="https://www.wuming.ren">武鸣人一号</a></li> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> <li id="m_2" class='m_li_wuming' onmouseover='mover_wuming(2);' onmouseout='mout_wuming_ren(2);'><a href="https://www.wuming.ren">武鸣人二号</a></li> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> <li id="m_3" class='m_li_wuming' onmouseover='mover_wuming(3);' onmouseout='mout_wuming_ren(3);'><a href="https://www.wuming.ren">武鸣人三号</a></li> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> <li id="m_4" class='m_li_wuming' onmouseover='mover_wuming(4);' onmouseout='mout_wuming_ren(4);'><a href="https://www.wuming.ren">武鸣人四号</a></li> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> <li id="m_5" class='m_li_wuming' onmouseover='mover_wuming(5);' onmouseout='mout_wuming_ren(5);'><a href="https://www.wuming.ren">武鸣人五号</a></li> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> <li id="m_6" class='m_li_wuming' onmouseover='mover_wuming(6);' onmouseout='mout_wuming_ren(6);'><a href="https://www.wuming.ren">武鸣人六号</a></li> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> <li id="m_7" class='m_li_wuming' onmouseover='mover_wuming(7);' onmouseout='mout_wuming_ren(7);'><a href="https://www.wuming.ren">武鸣人七号</a></li> <li class="m_line_wuming_ren"><img src="/img/20240420_www_wuming_ren_14.giff" /></li> </ul> </div> <div style="height:32px; background-color:#F1F1F1;"> <ul class="smenu_wuming_ren"> <li style="padding-left:29px;" id="s_1" class='s_li_a_wuming'><a href="https://www.wuming.ren">武鸣人一号内容</a>,各种信息免费发布,资源共享合作共赢!</li> <li style="padding-left:141px;" id="s_2" class='s_li_wuming' onmouseover='mover_wuming(2);' onmouseout='mout_wuming_ren(2);'><a href="https://www.wuming.ren">武鸣人二号内容</a>,各种信息免费发布,资源共享合作共赢!</li> <li style="padding-left:252px;" id="s_3" class='s_li_wuming' onmouseover='mover_wuming(3);' onmouseout='mout_wuming_ren(3);'><a href="https://www.wuming.ren">武鸣人三号内容</a>,各种信息免费发布,资源共享合作共赢!</li> <li style="padding-left:362px;" id="s_4" class='s_li_wuming' onmouseover='mover_wuming(4);' onmouseout='mout_wuming_ren(4);'><a href="https://www.wuming.ren">最新公告</a> | <a href="https://www.wuming.ren">会计通知</a></li> <li style="padding-left:474px;" id="s_5" class='s_li_wuming' onmouseover='mover_wuming(5);' onmouseout='mout_wuming_ren(5);'><a href="https://www.wuming.ren">最新政策</a> | <a href="https://www.wuming.ren">政策法规查询</a></li> <li style="padding-left:447px;" id="s_6" class='s_li_wuming' onmouseover='mover_wuming(6);' onmouseout='mout_wuming_ren(6);'><a href="https://www.wuming.ren">税收宣传</a> | <a href="https://www.wuming.ren">最新更新</a> | <a href="https://www.wuming.ren">文明创建</a> | <a href="https://www.wuming.ren" target="_blank">青年论坛</a> | <a href="https://www.wuming.ren">廉政课堂</a></li> <li style="padding-left:696px;" id="s_7" class='s_li_wuming' onmouseover='mover_wuming(7);' onmouseout='mout_wuming_ren(7);'><a href="https://www.wuming.ren">专题宣传区</a></li> </ul> </div> </body> </html>
本文来自武鸣人网站,转载请注明出处