导航菜单

基于bootsnav的超酷3d导航菜单

阿里云


这是一款基于 bootsnav 的超酷 3d 导航菜单。该导航菜单已 bootsnav 插件为基础,通过 css 代码来构建鼠标悬停菜单项时的 3d 翻转动画效果。
使用方法
在 HTML 文件中引入

  1. <link href="css/bootsnav.css" rel="stylesheet">
  2. <script src="//code.jquery.com/jquery.min.js"></script>
  3. <script src="js/bootstrap.min.js"></script>   
  4. <script src="js/bootsnav.js"></script>
也想出现在这里?联系我们
创客主机

HTML 结构

  1. <div class="collapse navbar-collapse" id="navbar-menu">
  2.     <ul class="nav navbar-nav" data-in="fadeInDown" data-out="fadeOutUp">
  3.         <li class="active"><a href="#" data-hover="Home">Home <span data-hover="Home"></span></a></li>
  4.         <li><a href="#" data-hover="About">About <span data-hover="About"></span></a></li>
  5.         <li class="dropdown">
  6.             <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="Shortcodes">Shortcodes <span data-hover="Shortcodes"></span></a>
  7.             <ul class="dropdown-menu animated">
  8.                 <li><a href="#">Custom Menu</a></li>
  9.                 <li><a href="#">Custom Menu</a></li>
  10.                 <li class="dropdown">
  11.                     <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sub Menu</a>
  12.                     <ul class="dropdown-menu animated">
  13.                         <li><a href="#">Custom Menu</a></li>
  14.                         <li><a href="#">Custom Menu</a></li>
  15.                         <li class="dropdown">
  16.                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sub Menu</a>
  17.                             <ul class="dropdown-menu multi-dropdown animated">
  18.                                 <li><a href="#">Custom Menu</a></li>
  19.                                 <li><a href="#">Custom Menu</a></li>
  20.                                 <li><a href="#">Custom Menu</a></li>
  21.                                 <li><a href="#">Custom Menu</a></li>
  22.                             </ul>
  23.                         </li>
  24.                         <li><a href="#">Custom Menu</a></li>
  25.                     </ul>
  26.                 </li>
  27.                 <li><a href="#">Custom Menu</a></li>
  28.                 <li><a href="#">Custom Menu</a></li>
  29.                 <li><a href="#">Custom Menu</a></li>
  30.                 <li><a href="#">Custom Menu</a></li>
  31.             </ul>
  32.         </li>
  33.         <li class="dropdown">
  34.             <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="Pages">Pages <span data-hover="Pages"></span></a>
  35.             <ul class="dropdown-menu animated">
  36.                 <li><a href="#">Custom Menu</a></li>
  37.                 <li><a href="#">Custom Menu</a></li>
  38.                 <li class="dropdown">
  39.                     <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sub Menu</a>
  40.                     <ul class="dropdown-menu animated">
  41.                         <li><a href="#">Custom Menu</a></li>
  42.                         <li><a href="#">Custom Menu</a></li>
  43.                         <li class="dropdown">
  44.                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sub Menu</a>
  45.                             <ul class="dropdown-menu multi-dropdown animated">
  46.                                 <li><a href="#">Custom Menu</a></li>
  47.                                 <li><a href="#">Custom Menu</a></li>
  48.                                 <li><a href="#">Custom Menu</a></li>
  49.                                 <li><a href="#">Custom Menu</a></li>
  50.                             </ul>
  51.                         </li>
  52.                         <li><a href="#">Custom Menu</a></li>
  53.                     </ul>
  54.                 </li>
  55.                 <li><a href="#">Custom Menu</a></li>
  56.                 <li><a href="#">Custom Menu</a></li>
  57.                 <li><a href="#">Custom Menu</a></li>
  58.                 <li><a href="#">Custom Menu</a></li>
  59.             </ul>
  60.         </li>
  61.         <li><a href="#" data-hover="Portfolio">Portfolio <span data-hover="Portfolio"></span></a></li>
  62.         <li class="dropdown megamenu-fw">
  63.             <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="Megamenu">Megamenu <span data-hover="Megamenu"></span></a>
  64.             <ul class="dropdown-menu megamenu-content animated" role="menu">
  65.                 <li>
  66.                     <div class="row">
  67.                         <div class="col-menu col-md-3">
  68.                             <h6 class="title">Title Menu One</h6>
  69.                             <div class="content">
  70.                                 <ul class="menu-col">
  71.                                     <li><a href="#">Custom Menu</a></li>
  72.                                     <li><a href="#">Custom Menu</a></li>
  73.                                     <li><a href="#">Custom Menu</a></li>
  74.                                     <li><a href="#">Custom Menu</a></li>
  75.                                     <li><a href="#">Custom Menu</a></li>
  76.                                 </ul>
  77.                             </div>
  78.                         </div><!-- end col-3 -->
  79.                         <div class="col-menu col-md-3">
  80.                             <h6 class="title">Title Menu Two</h6>
  81.                             <div class="content">
  82.                                 <ul class="menu-col">
  83.                                     <li><a href="#">Custom Menu</a></li>
  84.                                     <li><a href="#">Custom Menu</a></li>
  85.                                     <li><a href="#">Custom Menu</a></li>
  86.                                     <li><a href="#">Custom Menu</a></li>
  87.                                     <li><a href="#">Custom Menu</a></li>
  88.                                 </ul>
  89.                             </div>
  90.                         </div><!-- end col-3 -->
  91.                         <div class="col-menu col-md-3">
  92.                             <h6 class="title">Title Menu Three</h6>
  93.                             <div class="content">
  94.                                 <ul class="menu-col">
  95.                                     <li><a href="#">Custom Menu</a></li>
  96.                                     <li><a href="#">Custom Menu</a></li>
  97.                                     <li><a href="#">Custom Menu</a></li>
  98.                                     <li><a href="#">Custom Menu</a></li>
  99.                                     <li><a href="#">Custom Menu</a></li>
  100.                                 </ul>
  101.                             </div>
  102.                         </div>
  103.                         <div class="col-menu col-md-3">
  104.                             <h6 class="title">Title Menu Four</h6>
  105.                             <div class="content">
  106.                                 <ul class="menu-col">
  107.                                     <li><a href="#">Custom Menu</a></li>
  108.                                     <li><a href="#">Custom Menu</a></li>
  109.                                     <li><a href="#">Custom Menu</a></li>
  110.                                     <li><a href="#">Custom Menu</a></li>
  111.                                     <li><a href="#">Custom Menu</a></li>
  112.                                 </ul>
  113.                             </div>
  114.                         </div><!-- end col-3 -->
  115.                     </div><!-- end row -->
  116.                 </li>
  117.             </ul>
  118.         </li>
  119.         <li><a href="#" data-hover="Contact">Contact <span data-hover="Contact"></span></a></li>
  120.     </ul>
  121. </div>
  122. </nav>
  123. </div>
  124. </div>
  125. </div>

CSS 样式

  1. nav.navbar.bootsnav{
  2.     font-family: 'Roboto', sans-serif;
  3.     margin-bottom: 150px;
  4.     border: none;
  5. }
  6. nav.navbar.bootsnav .navbar-collapse{ padding: 0; }
  7. nav.navbar.bootsnav ul.nav > li > a{
  8.     color: #fff;
  9.     background-color: #333;
  10.     font-size: 16px;
  11.     font-weight: 700;
  12.     text-transform: uppercase;
  13.     padding: 10px 15px 10px;
  14.     margin: 0;
  15.     border: none;
  16.     border-bottom: 3px solid #e84393;
  17.     overflow: hidden;
  18.     position: relative;
  19.     z-index: 1;
  20.     transition: all 0.1s ease-out;
  21. }
  22. nav.navbar.bootsnav ul.nav > li.dropdown > a{ padding: 10px 25px 10px 10px; }
  23. nav.navbar.bootsnav ul.nav > li.active > a,
  24. nav.navbar.bootsnav ul.nav > li.active > a:hover,
  25. nav.navbar.bootsnav ul.nav > li > a:hover,
  26. nav.navbar.bootsnav ul.nav > li.on > a{
  27.     color: #fff;
  28.     background-color: #e84393;
  29.     text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
  30. }
  31. nav.navbar.bootsnav ul.nav > li > a>span:before,
  32. nav.navbar.bootsnav ul.nav > li > a>span:after{
  33.     content: '';
  34.     background: rgba(0,0,0,0.2);
  35.     height: 50%;
  36.     width: 50%;
  37.     opacity: 1;
  38.     position: absolute;
  39.     left: -50%;
  40.     top: -50%;
  41.     z-index: -1;
  42.     transition: all 0.2s ease;
  43. }
  44. nav.navbar.bootsnav ul.nav > li > a>span:after{
  45.     left: 100%;
  46.     top: 100%;
  47. }
  48. nav.navbar.bootsnav ul.nav > li.active > a>span:before,
  49. nav.navbar.bootsnav ul.nav > li.active > a:hover>span:before,
  50. nav.navbar.bootsnav ul.nav > li > a:hover>span:before,
  51. nav.navbar.bootsnav ul.nav > li.on > a>span:before{
  52.     left: 0;
  53.     top: 0;
  54. }
  55. nav.navbar.bootsnav ul.nav > li.active > a>span:after,
  56. nav.navbar.bootsnav ul.nav > li.active > a:hover>span:after,
  57. nav.navbar.bootsnav ul.nav > li > a:hover>span:after,
  58. nav.navbar.bootsnav ul.nav > li.on > a>span:after{
  59.     left: 50%;
  60.     top: 50%;
  61. }
  62. nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content li a:hover,
  63. nav.navbar.bootsnav li.dropdown ul.dropdown-menu li a:hover,
  64. nav.navbar.bootsnav li.dropdown ul.dropdown-menu li a.dropdown-toggle:active,
  65. nav.navbar ul.nav li.dropdown.on ul.dropdown-menu li.dropdown.on > a{
  66.     text-shadow: 0 0 5px #000;
  67. }
  68. nav.navbar.bootsnav ul.nav > li.dropdown > a.dropdown-toggle:after{
  69.     color: #fff;
  70.     margin: 0 0 0 7px;
  71.     position: absolute;
  72.     top: 9px;
  73.     right: 7px;
  74.     transition: all 0.3s;
  75. }
  76. nav.navbar.bootsnav ul.nav > li.dropdown > ul{
  77.     background-color: #333;
  78.     opacity: 0;
  79.     transform: perspective(600px) rotateX(-90deg);
  80.     transform-origin: top center;
  81.     transform-style: preserve-3d;
  82.     visibility: hidden;
  83.     transition: all 0.3s ease 0s;
  84. }
  85. nav.navbar.bootsnav ul.nav > li.dropdown.on > ul{
  86.     opacity: 1 !important;
  87.     visibility: visible !important;
  88.     transform: perspective(600px) rotateX(0);
  89. }
  90. .dropdown-menu.multi-dropdown{
  91.     position: absolute;
  92.     left: -100% !important;
  93. }
  94. nav.navbar.bootsnav li.dropdown ul.dropdown-menu{
  95.     background-color: #333;
  96.     border: none;
  97.     top: 101%;
  98.     z-index: 1;
  99.     transition: all 0.3s ease;
  100. }
  101. nav.navbar.bootsnav li.dropdown ul.dropdown-menu > li > a{
  102.     color: #fff;
  103.     font-weight: 500;
  104.     border: none;
  105.     position: relative;
  106.     transition: all 0.3s;
  107. }
  108. nav.navbar.bootsnav li.dropdown ul.dropdown-menu > li > a:after,
  109. nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .menu-col li a:after{
  110.     content: '';
  111.     background-color: #e84393;
  112.     height: 100%;
  113.     width: 5px;
  114.     transform: scaleY(0);
  115.     position: absolute;
  116.     top: 0;
  117.     left: 0;
  118.     transition: all 0.3s ease;
  119. }
  120. nav.navbar ul.nav li.dropdown.on ul.dropdown-menu li.dropdown.on > a:after,
  121. nav.navbar.bootsnav li.dropdown ul.dropdown-menu > li > a:hover:after,
  122. nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .menu-col li a:hover:after{
  123.     transform: scaleY(1);
  124. }
  125. nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content{
  126.     background-color: #333;
  127.     overflow: hidden;
  128.     top: 86%;
  129. }
  130. nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content li{ font-size: 14px; }
  131. nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .menu-col li a{
  132.     color: #fff;
  133.     padding-left: 10px;
  134.     position: relative;
  135. }
  136. nav.navbar.bootsnav ul.nav li.megamenu-fw > a:hover,
  137. nav.navbar.bootsnav ul.nav li.megamenu-fw > a:focus,
  138. nav.navbar.bootsnav ul.nav li.megamenu-fw.on > a{ background-color: #e84393 !important; }
  139. nav.navbar.bootsnav ul.dropdown-menu.megamenu-content .col-menu{ padding: 0 15px; }
  140. nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .title{
  141.     color: #fff;
  142.     background-color: #e84393;
  143.     font-size: 16px;
  144.     font-weight: bold;
  145.     padding: 5px 10px;
  146.     border-radius: 5px 0 5px 5px;
  147. }
  148. @media only screen and (max-width:990px){
  149.     .dropdown-menu.multi-dropdown{ left: 0 !important; }
  150.     nav.navbar.bootsnav .navbar-toggle{
  151.         color: #fff;
  152.         background: #e84393 !important;
  153.         padding: 3px 8px;
  154.         margin-top: 2px;
  155.         border-radius: 0;
  156.     }
  157.     nav.navbar.bootsnav.navbar-mobile .navbar-collapse{ background-color: #333; }
  158.     nav.navbar.bootsnav ul.nav>li{ margin: 0 auto 2px; }
  159.     nav.navbar.bootsnav.navbar-mobile ul.nav>li>a{
  160.         text-align: center;
  161.         padding: 10px 15px;
  162.         margin: 0;
  163.         border: none;
  164.     }
  165.     nav.navbar.bootsnav ul.nav>li.dropdown>a{ padding: 10px 10px 10px 28px; }
  166.     nav.navbar.bootsnav ul.nav>li.dropdown>a.dropdown-toggle:before{ color: #fff; }
  167.     nav.navbar.bootsnav ul.nav > li.dropdown > ul{ left: -5px; }
  168.     nav.navbar.bootsnav ul.nav li.dropdown ul.dropdown-menu{
  169.         margin: 0 0 -1px 0 !important;
  170.         z-index: 1;
  171.     }
  172.     nav.navbar.bootsnav ul.nav li.dropdown ul.dropdown-menu>li>a{
  173.         color: #fff;
  174.         padding-left: 10px;
  175.         border: none;
  176.         position: relative;
  177.     }
  178.     nav.navbar.bootsnav ul.nav li.dropdown ul.dropdown-menu>li.dropdown:after{
  179.         content: '';
  180.         background-color: #e84393;
  181.         height: 50px;
  182.         width: 5px;
  183.         transform: scaleY(0);
  184.         position: absolute;
  185.         left: 0;
  186.         top: 0;
  187.         z-index: 1;
  188.         transition: all 0.3s ease;
  189.     }
  190.     nav.navbar.bootsnav ul.nav li.dropdown ul.dropdown-menu>li.dropdown:hover:after,
  191.     nav.navbar.bootsnav ul.nav li.dropdown ul.dropdown-menu>li.dropdown.on:after{
  192.         transform: scaleY(1);
  193.     }
  194.     nav.navbar.bootsnav .dropdown-menu{ z-index: 0; }
  195.     nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content{ top: 0; }
  196.     nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .title{
  197.         color: #fff;
  198.         font-size: 14px;
  199.         font-weight: 600;
  200.         border: none;
  201.     }
  202.     nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .content{ border: none; }
  203.     nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .col-menu.on .title{ font-weight: 600; }
  204.     nav.navbar.bootsnav li.dropdown ul.dropdown-menu.megamenu-content .col-menu li a{
  205.        color: #fff;
  206.        background-color: #333;
  207.        border: none;
  208.        margin-bottom: 0;
  209.     }
  210. }

基于 bootsnav 的超酷 3d 导航菜单

已有 379 人购买
  • yefh
查看演示升级 VIP立刻购买

演示地址 下载地址
收藏
(0)

发表回复

热销模板

Ashade - 作品展示摄影相册WordPress汉化主题
LensNews

本站承接 WordPress / PbootCMS / DedeCMS 等
系统建站、仿站、开发、定制等业务!