Bootstrap导航菜单插件sina-nav

时间:2024-05-20 16:56:51

导航菜单插件sina-nav介绍

sina-nav是一款Bootstrap4导航菜单插件。通过该插件可快速创建基于bootstrap4的下拉菜单、大型菜单,属性菜单和侧边栏菜单等。它的特点还有:

  1. 支持无限级子菜单。
  2. 响应式设计。
  3. 支持隐藏侧边栏。
  4. 通过Animate.css制作菜单动画效果。

导航菜单插件sina-nav使用

  • 首先是在页面中导入一些基础的资源文件
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/animate.css">
<link rel="stylesheet" href="assets/css/sina-nav.css">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/sina-nav.js"></script>
  • HTML结构:导航菜单具有一定的HTML结构
<nav class="sina-nav mobile-sidebar navbar-fixed" data-top="0">
  <div class="container">
    <div class="search-box">
      <form role="search" method="get" action="#">
        <span class="search-addon close-search"><i class="fa fa-times"></i></span>
        <div class="search-input">
          <input type="search" class="form-control" placeholder="Search here" value="" name="">
        </div>
        <span class="search-addon search-icon"><i class="fa fa-search"></i></span>
      </form>
    </div><!-- .search-box -->
 
    <div class="extension-nav">
      <ul>
        <li class="search"><a href="#"><i class="fa fa-search"></i></a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" >
            <i class="fa fa-shopping-bag"></i>
            <span class="shop-badge">2</span>
          </a>
          <ul class="dropdown-menu shop-menu">
            <li>
              <a href="#" class="shop-item-photo">
                <img src="#" alt="" />
              </a>
              <a href="#" class="shop-item-link">Delica omtantur</a>
              <p class="shop-item-price">2 - $19</p>
            </li>
            <li>
              <a href="#" class="shop-item-photo">
                <img src="#" alt="" />
              </a>
              <a href="#" class="shop-item-link">Delica omtantur</a>
              <p class="shop-item-price">2 - $19</p>
            </li>
            <li class="shop-total-price">
              <a href="#" class="btn btn-secondary shop-btn">Cart</a>
              <span>Total: $0.00</span>
            </li>
          </ul>
        </li>
        <li><a href="#"><i class="fa fa-facebook"></i></a></li>
        <li><a href="#"><i class="fa fa-twitter"></i></a></li>
        <li><a href="#"><i class="fa fa-linkedin"></i></a></li>
        <li class="widget-bar-btn"><a href="#"><i class="fa fa-bars"></i></a></li>
      </ul>
    </div><!-- .extension-nav -->
 
    <div class="sina-nav-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-menu">
        <i class="fa fa-bars"></i>
      </button>
      <a class="sina-brand social-on" href="#">
        <h2>
          Sina-nav
        </h2>
        <p>Learn Something New</p>
      </a>
    </div><!-- .sina-nav-header -->
 
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="navbar-menu">
      <ul class="sina-menu" data-in="fadeInLeft" data-out="fadeInOut">
        <li class="scroll"><a href="#home">Home</a></li>
        <li class="active scroll"><a href="#about">About</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" >Dropdown</a>
          <ul class="dropdown-menu">
            <li><a href="#">Custom Menu</a></li>
            <li><a href="#">Custom Menu<p class="description">This is Description</p></a>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" >Dropdown</a>
              <ul class="dropdown-menu">
                <li><a href="#">Custom Menu</a></li>
                <li><a href="#">Custom Menu</a></li>
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" >Dropdown</a>
                  <ul class="dropdown-menu">
                    <li><a href="#">Custom Menu</a></li>
                    <li><a href="#">Custom Menu</a></li>
                    <li><a href="#">Custom Menu</a></li>
                  </ul>
                </li>
                <li><a href="#">Custom Menu</a></li>
              </ul>
            </li>
          </ul>
        </li>
        <li class="dropdown menu-item-has-mega-menu">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Megamenu</a>
          <div class="mega-menu dropdown-menu">
            <ul class="mega-menu-row" role="menu">
              <li class="mega-menu-col col-md-4">
                <h4 class="mega-menu-col-title">Menu Titlle</h4>
                <ul class="sub-menu">
                  <li><a href="#">Custom Menu</a></li>
                  <li><a href="#">Custom Menu</a></li>
                  <li><a href="#">Custom Menu</a></li>
                </ul>
              </li>
              <li class="mega-menu-col col-md-4">
                <h4 class="mega-menu-col-title">Menu Titlle</h4>
                <ul class="sub-menu">
                  <li><a href="#">Custom Menu</a></li>
                  <li><a href="#">Custom Menu</a></li>
                  <li><a href="#">Custom Menu</a></li>
                </ul>
              </li>
              <li class="mega-menu-col col-md-4">
                <h4 class="mega-menu-col-title">Menu Titlle</h4>
                <ul class="sub-menu">
                  <li><a href="#">Custom Menu</a></li>
                  <li><a href="#">Custom Menu</a></li>
                  <li><a href="#">Custom Menu</a></li>
                </ul>
              </li>
            </ul><!-- end row -->
          </div>
        </li>
        <li class="scroll"><a href="#blog">Blog</a></li>
        <li class="scroll"><a href="#contact">Contact</a></li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- .container -->
 
  <!-- Start widget-bar -->
  <div class="widget-bar">
    <a href="#" class="close-widget-bar"><i class="fa fa-times"></i></a>
    <div class="widget">
      <h6 class="title">Custom Pages</h6>
      <ul class="link">
        <li><a href="#">About</a></li>
        <li><a href="#">Services</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#">Portfolio</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </div>
    <div class="widget">
      <h6 class="title">Additional Links</h6>
      <ul class="link">
        <li><a href="#">Retina Homepage</a></li>
        <li><a href="#">New Page Examples</a></li>
        <li><a href="#">Parallax Sections</a></li>
        <li><a href="#">Shortcode Central</a></li>
        <li><a href="#">Ultimate Font Collection</a></li>
      </ul>
    </div>
  </div>
  <!-- End widget-bar -->
</nav>

导航菜单插件sina-nav使用案例

<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Bootstrap4导航菜单sina-nav|DEMO_jQuery之家-*分享jQuery、html5、css3的插件库</title>
	<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css"><!--演示页面样式,使用时可以不引用-->
	<!--For Plugins css-->
	<link rel="stylesheet" href="assets/css/bootstrap.min.css">
	<link rel="stylesheet" href="assets/css/font-awesome.min.css">
	<link rel="stylesheet" href="assets/css/animate.css">
	<link rel="stylesheet" href="assets/css/sina-nav.css">
</head>
<body>
	<nav class="sina-nav mobile-sidebar navbar-fixed" data-top="0">
		<div class="container">

			<div class="search-box">
				<form role="search" method="get" action="#">
					<span class="search-addon close-search"><i class="fa fa-times"></i></span>
					<div class="search-input">
						<input type="search" class="form-control" placeholder="Search here" value="" name="">
					</div>
					<span class="search-addon search-icon"><i class="fa fa-search"></i></span>
				</form>
			</div><!-- .search-box -->

			<div class="extension-nav">
				<ul>
					<li class="search"><a href="#"><i class="fa fa-search"></i></a></li>
					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" >
							<i class="fa fa-shopping-bag"></i>
							<span class="shop-badge">2</span>
						</a>
						<ul class="dropdown-menu shop-menu">
							<li>
								<a href="#" class="shop-item-photo">
									<img src="#" alt="" />
								</a>
								<a href="#" class="shop-item-link">Delica omtantur</a>
								<p class="shop-item-price">2 - $19</p>
							</li>
							<li>
								<a href="#" class="shop-item-photo">
									<img src="#" alt="" />
								</a>
								<a href="#" class="shop-item-link">Delica omtantur</a>
								<p class="shop-item-price">2 - $19</p>
							</li>
							<li class="shop-total-price">
								<a href="#" class="btn btn-secondary shop-btn">Cart</a>
								<span>Total: $0.00</span>
							</li>
						</ul>
					</li>
					<li><a href="#"><i class="fa fa-facebook"></i></a></li>
					<li><a href="#"><i class="fa fa-twitter"></i></a></li>
					<li><a href="#"><i class="fa fa-linkedin"></i></a></li>
					<li class="widget-bar-btn"><a href="#"><i class="fa fa-bars"></i></a></li>
				</ul>
			</div><!-- .extension-nav -->

			<div class="sina-nav-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-menu">
					<i class="fa fa-bars"></i>
				</button>
				<a class="sina-brand social-on" href="#">
					<h2>
						Sina-nav
					</h2>
					<p>Learn Something New</p>
				</a>
			</div><!-- .sina-nav-header -->

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse" id="navbar-menu">
				<ul class="sina-menu" data-in="fadeInLeft" data-out="fadeInOut">
					<li class="scroll"><a href="#home">Home</a></li>
					<li class="active scroll"><a href="#about">About</a></li>
					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" >Dropdown</a>
						<ul class="dropdown-menu">
							<li><a href="#">Custom Menu</a></li>
							<li><a href="#">Custom Menu<p class="description">This is Description</p></a>
							</li>
							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown" >Dropdown</a>
								<ul class="dropdown-menu">
									<li><a href="#">Custom Menu</a></li>
									<li><a href="#">Custom Menu</a></li>
									<li class="dropdown">
										<a href="#" class="dropdown-toggle" data-toggle="dropdown" >Dropdown</a>
										<ul class="dropdown-menu">
											<li><a href="#">Custom Menu</a></li>
											<li><a href="#">Custom Menu</a></li>
											<li><a href="#">Custom Menu</a></li>
										</ul>
									</li>
									<li><a href="#">Custom Menu</a></li>
								</ul>
							</li>
						</ul>
					</li>
					<li class="dropdown menu-item-has-mega-menu">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown">Megamenu</a>
						<div class="mega-menu dropdown-menu">
							<ul class="mega-menu-row" role="menu">
								<li class="mega-menu-col col-md-4">
									<h4 class="mega-menu-col-title">Menu Titlle</h4>
									<ul class="sub-menu">
										<li><a href="#">Custom Menu</a></li>
										<li><a href="#">Custom Menu</a></li>
										<li><a href="#">Custom Menu</a></li>
									</ul>
								</li>
								<li class="mega-menu-col col-md-4">
									<h4 class="mega-menu-col-title">Menu Titlle</h4>
									<ul class="sub-menu">
										<li><a href="#">Custom Menu</a></li>
										<li><a href="#">Custom Menu</a></li>
										<li><a href="#">Custom Menu</a></li>
									</ul>
								</li>
								<li class="mega-menu-col col-md-4">
									<h4 class="mega-menu-col-title">Menu Titlle</h4>
									<ul class="sub-menu">
										<li><a href="#">Custom Menu</a></li>
										<li><a href="#">Custom Menu</a></li>
										<li><a href="#">Custom Menu</a></li>
									</ul>
								</li>
							</ul><!-- end row -->
						</div>
					</li>
					<li class="scroll"><a href="#blog">Blog</a></li>
					<li class="scroll"><a href="#contact">Contact</a></li>
				</ul>
			</div><!-- /.navbar-collapse -->
		</div><!-- .container -->

		<!-- Start widget-bar -->
		<div class="widget-bar">
			<a href="#" class="close-widget-bar"><i class="fa fa-times"></i></a>
			<div class="widget">
				<h6 class="title">Custom Pages</h6>
				<ul class="link">
					<li><a href="#">About</a></li>
					<li><a href="#">Services</a></li>
					<li><a href="#">Blog</a></li>
					<li><a href="#">Portfolio</a></li>
					<li><a href="#">Contact</a></li>
				</ul>
			</div>
			<div class="widget">
				<h6 class="title">Additional Links</h6>
				<ul class="link">
					<li><a href="#">Retina Homepage</a></li>
					<li><a href="#">New Page Examples</a></li>
					<li><a href="#">Parallax Sections</a></li>
					<li><a href="#">Shortcode Central</a></li>
					<li><a href="#">Ultimate Font Collection</a></li>
				</ul>
			</div>
		</div>
		<!-- End widget-bar -->
	</nav>

<div class="container">
	<div class="row">
		<div class="col-6 col-lg-12">
			<header class="htmleaf-header">
			<h1>Bootstrap4导航菜单sina-nav <span>bootstrap 4 compatible sina-nav</span></h1>
				<div class="htmleaf-links">
					<a class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.htmleaf.com/" title="jQuery之家" target="_blank"><span> jQuery之家</span></a>
					<a class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://www.htmleaf.com/jQuery/Menu-Navigation/201811125408.html" title="返回下载页" target="_blank"><span> 返回下载页</span></a>
				</div>
			</header>
			<div id="home">
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
			</div>

			<div id="about">
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
			</div>

			<div id="portfolio">
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
			</div>

			<div id="blog">
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
			</div>

			<div id="contact">
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
				<p>
					Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
					tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
					quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
					consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
					cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
					proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
				</p>
			</div>

			<div class="related">
			    <h3>如果你喜欢这个插件,那么你可能也喜欢:</h3>
			    <a href="http://www.htmleaf.com/jQuery/Menu-Navigation/201807285250.html">
				  <img src="related/1.jpg" width="300" alt="适合移动手机的jQuery多级侧边栏菜单插件"/>
				  <h3>适合移动手机的jQuery多级侧边栏菜单插件</h3>
				</a>
				<a href="http://www.htmleaf.com/jQuery/Menu-Navigation/201708194693.html">
				  <img src="related/2.jpg" width="300" alt="Bootstrap多级导航菜单"/>
				  <h3>Bootstrap多级导航菜单</h3>
				</a>
			</div>

		</div>
	</div>
</div>
	
	<!-- JS files -->
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/js/bootstrap.min.js"></script>
	<script src="assets/js/wow.min.js"></script>
	<script src="assets/js/sina-nav.js"></script>

	<!-- For All Plug-in Activation & Others -->
	<script type="text/javascript">
		$(document).ready(function() {
			// WOW animation initialize
			new WOW().init();
		});
	</script>
</body>
</html>

效果如下:
Bootstrap导航菜单插件sina-nav

导航菜单插件sina-nav相关资源离线下载

地址:导航菜单插件sina-nav相关资源下载,提货码:vt7n