栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS > CSS教程

打造最美CSS多级下拉横向导航菜单代码

CSS教程 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

本文实例为大家分享了纯CSS实现多级下拉横向导航菜单代码,供大家参考,具体内容如下

先看看效果图:

实现代码:

CSS代码:

CSS Code复制内容到剪贴板
  1.   
  2.   
  3. #backgroundHolder { width:750px; height:500px; padding-top:10px; margin:0 auto; }   
  4.   
  5.   
  6. .nav, .nav ul { list-style-type:none; margin:0; padding:0; }   
  7. .nav a { text-decoration:none; }   
  8. .nav { font-family: arial, sans-serif; font-size:12px; width:650px; margin:0 auto; }   
  9.   
  10. .nav a { background:url(ulmulti3/box.gif) no-repeat rightright center; }   
  11. .nav a.top { background:url(ulmulti3/box.gif) no-repeat rightright top; }   
  12. .nav a.top2 { background:url(ulmulti3/box2.gif) no-repeat rightright top; }   
  13. .nav a.bottombottom { background:url(ulmulti3/box.gif) no-repeat rightright bottombottom; }   
  14. .rightright ul ul a { background:url(ulmulti3/box3.gif) no-repeat rightright center; }   
  15. .rightright ul ul a.top2 { background:url(ulmulti3/box3.gif) no-repeat rightright top; }   
  16. .rightright ul ul a.bottombottom { background:url(ulmulti3/box3.gif) no-repeat rightright bottombottom; }   
  17.   
  18. .nav a b { color:#fff; font-weight:normal; display:block; padding:5px 10px 5px 15px; }   
  19. .nav .fly .main b { background: transparent url(ulmulti3/arrow.gif) no-repeat 117px 9px; }   
  20. .nav .down b { background: transparent url(ulmulti3/arrow2.gif) no-repeat 115px 11px; }   
  21. .nav .rightright ul b { text-align:rightright; }   
  22. .nav .rightright ul ul b { padding: 5px 15px 5px 10px; }   
  23. .nav .rightright ul .main b { background: transparent url(ulmulti3/arrow3.gif) no-repeat 15px 9px; text-align:rightright; }   
  24. .nav .rightright ul ul .main b { background: transparent url(ulmulti3/arrow3.gif) no-repeat 5px 9px; text-align:rightright; }   
  25.   
  26. .nav ul ul { top:-24px; }   
  27. .nav ul ul ul { top:-25px; }   
  28. .nav ul.two { top:-40px; }   
  29.   
  30.     
  31.   
  32. .nav .drop, .nav a { width:130px; }   
  33. .nav ul li { max-width:130px; }   
  34.   
  35. .nav ul ul { left:130px; }   
  36.   
  37. .nav li.rightright ul ul { left:auto; rightright:120px; }   
  38. .nav li.rightright ul ul ul { left:auto; rightright:130px; }   
  39.    
  40. .nav a { margin-right:-129px; }   
  41.   
  42.     
  43.   
  44. .nav li { float:left; }   
  45. .nav ul { float:left; position:relative; z-index:20; }   
  46. .nav ul li { clear:left; }   
  47. .nav a { position:relative; display:block; }   
  48. .nav a.main { float:left;  margin-top:10000px; }   
  49. .nav .drop, .nav .fly { margin-top:-10000px; }   
  50. .nav ul { margin-bottom:-5000px; }   
  51.   
  52.     
  53. .nav a:hover, .nav a:focus, .nav a:active { margin-right:0; z-index:10; outline:0; }   
  54. .nav a:hover b, .nav a:focus b, .nav a:active b { color:#000; cursor:pointer; }   
  55.   
  56. .nav ul:hover, .nav ul ul:hover { clear:left; }   
  57.     
  58.   
  59.   
  60. 我们一直用心在做
    关于我们 文章归档 网站地图 联系我们

    版权所有 (c)2021-2022 MSHXW.COM

    ICP备案号:晋ICP备2021003244-6号