纯css打造的多级下拉导航菜单代码 来源:未知 作者: 大小: 大小: 0KB 点击次数: 发布时间:2017-06-22 17:45:05 去下载 去预览 特效介绍 纯css,不含任何js代码的带有多级下拉菜单的css导航,运行下面的代码查看效果: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>纯css打造的多级下拉导航菜单代码</title> <!--[imcss] *** Infinite Menus Core CSS: Keep this section in the document head for full validation. --> <style type="text/css">.imcm ul,.imcm li,.imcm div,.imcm span,.imcm a{text-align:left;vertical-align:top;padding:0px;margin:0;list-style:none outside none;border-style:none;background-image:none;clear:none;float:none;display:block;position:static;overflow:visible;line-height:normal;}.imcm li a img{display:inline;border-width:0px;}.imcm span{display:inline;}.imcm .imclear,.imclear{clear:both;height:0px;visibility:hidden;line-height:0px;font-size:1px;}.imcm .imsc{position:relative;}.imcm .imsubc{position:absolute;visibility:hidden;}.imcm li{list-style:none;font-size:1px;float:left;}.imcm ul ul li{width:100%;float:none !important;}.imcm a{display:block;position:relative;}.imcm ul .imsc,.imcm ul .imsubc {z-index:10;}.imcm ul ul .imsc,.imcm ul ul .imsubc{z-index:20;}.imcm ul ul ul .imsc,.imcm ul ul ul .imsubc{z-index:30;}.imde ul li:hover .imsubc{visibility:visible;}.imde ul ul li:hover .imsubc{visibility:visible;}.imde ul ul ul li:hover .imsubc{visibility:visible;}.imde li:hover ul .imsubc{visibility:hidden;}.imde li:hover ul ul .imsubc{visibility:hidden;}.imde li:hover ul ul ul .imsubc{visibility:hidden;}.imcm .imea{display:block;position:relative;left:0px;font-size:1px;line-height:1px;height:0px;width:1px;float:right;}.imcm .imea span{display:block;position:relative;font-size:1px;line-height:0px;}.dvs,.dvm{border-width:0px}/*\*//*/.imcm .imea{visibility:hidden;}/**/</style><!--[if IE]><style type="text/css">.imcm .imea span{position:absolute;}.imcm .imclear,.imclear{display:none;}.imcm{zoom:1;} .imcm li{curosr:hand;} .imcm ul{zoom:1}.imcm a{zoom:1;}</style><![endif]--><!--[if gte IE 7]><style type="text/css">.imcm .imsubc{background-image:url(ie_css_fix);}</style><![endif]--><!--end--> <!--[imstyles] *** Infinite Menu Styles: Keep this section in the document head for full validation. --> <style type="text/css"> #imenus0 .imeam span,#imenus0 .imeamj span {background-image:url(/view/demoimg/sample3_main_arrow.gif); width:7px; height:5px; left:-7px; top:5px; background-repeat:no-repeat;background-position:top left;} #imenus0 li:hover .imeam span,#imenus0 li a.iactive .imeamj span {background-image:url(/view/demoimg/sample3_main_arrow.gif); background-repeat:no-repeat;background-position:top left;} #imenus0 ul .imeas span,#imenus0 ul .imeasj span {background-image:url(/view/demoimg/sample3_sub_arrow.gif); width:5px; height:7px; left:-5px; top:3px; background-repeat:no-repeat;background-position:top left;} #imenus0 ul li:hover .imeas span,#imenus0 ul li a.iactive .imeasj span {background-image:url(/view/demoimg/sample3_sub_arrow.gif); background-repeat:no-repeat;background-position:top left;} #imouter0 {background-color:#ffffff; border-style:none; border-color:#6a6a6a; border-width:1px; padding:0px; margin:0px; } #imenus0 li ul {background-color:#efefef; border-style:solid; border-color:#cccccc; border-width:1px; padding:5px; margin:4px 0px 0px; } #imenus0 li a, #imenus0 .imctitle {color:#333333; text-align:left; font-family:Arial; font-size:12px; font-weight:normal; text-decoration:underline; border-style:solid; border-color:#dddddd; border-width:1px; padding:2px 8px; } #imenus0 li:hover>a {background-color:#efefef; text-decoration:underline; } #imenus0 li a.ihover, .imde imenus0 a:hover {background-color:#efefef; text-decoration:underline; } #imenus0 li a.iactive {} #imenus0 ul a, #imenus0 .imsubc li .imctitle {color:#555555; text-align:left; font-size:11px; font-weight:normal; text-decoration:none; border-style:none; border-color:#000000; border-width:1px; padding:2px 5px; } #imenus0 ul li:hover>a {color:#000000; text-decoration:underline; } #imenus0 ul li a.ihover {color:#000000; text-decoration:underline; } #imenus0 ul li a.iactive {background-color:#ffffff; } </style><!--end--> </head> <body> <div class="imrcmain0 imgl" style="width:580px;z-index:999999;position:relative;"><div class="imcm imde" id="imouter0"><ul id="imenus0"> <li class="imatm" style="width:145px;"><a class="" href="#"><span class="imea imeam"><span></span></span>Who We Are</a> <div class="imsc"><div class="imsubc" style="width:145px;top:0px;left:0px;"><ul style=""> <li><a href="#">Overview</a></li> <li><a href="#">Mission & Goals</a></li> <li><a href="#">History</a></li> <li><a href="#">Management</a></li> <li><a href="#">Working at Tyco</a></li> <li><a href="#">Press Center</a></li> <li><a href="#"><span class="imea imeas"><span></span></span>Worldwide</a> <div class="imsc"><div class="imsubc" style="width:140px;top:-23px;left:132px;"><ul style=""> <li><a href="#">Europe</a></li> <li><a href="#">Asia</a></li> <li><a href="#">US & Canada</a></li> <li><a href="#">Mexico</a></li> <li><a href="#">Australia</a></li> <li><a href="#">Middle East</a></li> </ul></div></div></li> <li><a href="#"><span class="imea imeas"><span></span></span>Board of Directors</a> <div class="imsc"><div class="imsubc" style="width:140px;top:-23px;left:132px;"><ul style=""> <li><a href="#">Overview</a></li> <li><a href="#">Electronics</a></li> <li><a href="#">Fire & Security</a></li> <li><a href="#">Healthcare</a></li> <li><a href="#">Plastics & Adhesives</a></li> <li><a href="#">Engineered Producs</a></li> <li><a href="#">Tyco Worldwide</a></li> </ul></div></div></li> <li><a href="#">Customers</a></li> </ul></div></div></li> <li class="imatm" style="width:145px;"><a href="#"><span class="imea imeam"><span></span></span>Our Commitment</a> <div class="imsc"><div class="imsubc" style="width:146px;top:0px;left:-1px;"><ul style=""> <li><a href="#">Overview</a></li> <li><a href="#">People & Values</a></li> <li><a href="#">Governance</a></li> <li><a href="#">Community</a></li> <li><a href="#">Environmental</a></li> </ul></div></div></li> <li class="imatm" style="width:145px;"><a href="#"><span class="imea imeam"><span></span></span>Our Business</a> <div class="imsc"><div class="imsubc" style="width:146px;top:0px;left:0px;"><ul style=""> <li><a href="#">Overview</a></li> <li><a href="#">Electronics</a></li> <li><a href="#">Fire & Security</a></li> <li><a href="#">Healthcare</a></li> <li><a href="#">Plastics & Adhesives</a></li> <li><a href="#">Engineered Producs</a></li> <li><a href="#">Tyco Worldwide</a></li> </ul></div></div></li> <li class="imatm" style="width:145px;"><a href="#"><span class="imea imeam"><span></span></span>Investors</a> <div class="imsc"><div class="imsubc" style="width:146px;top:0px;left:-1px;"><ul style=""> <li><a href="#">Overview</a></li> <li><a href="#">Stock Quotes</a></li> </ul></div></div></li> </ul><div class="imclear"> </div></div></div> </body> </html> 提示:您可以先修改部分代码再运行 请注意: 1、本菜单效果不兼容IE8以下的浏览器,包括IE8。 2、预览图和运行效果略有不同,请以运行后的效果为准。 使用方法 无。 TAGS: css导航菜单代码 下载 预览 上一篇: 弹性动感放大显示的导航效果js代码 下一篇: css+js简单的二级导航菜单代码下载