bootsnav是一款基于Bootstrap的导航菜单布局设计 jquery插件。该插件集成了23种Bootstrap导航菜单效果,有下拉菜单,大型菜单,侧边栏菜单,购物车菜单等,可以满足大部分网页导航菜单设计的需求。
使用方法
bootsnav导航菜单的目录结构如下:
bootsnav/
├── css/
│ ├── bootsnav.css
│ ├── overwrite.css
├── js/
│ ├── bootsnav.js
└── skins/
└── color.css
|
HTML结构
使用bootsnav导航菜单的基本HTML结构如下:
<!DOCTYPE html>
< html lang = "zh" >
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title >Bootsnav - Multi Purpose Header</ title >
<!-- Bootstrap Core CSS -->
< link href = "css/bootstrap.min.css" rel = "stylesheet" >
<!-- Font Icons -->
< link href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css" rel = "stylesheet" >
<!-- Font Style -->
< link href = "https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel = "stylesheet" type = "text/css" >
<!-- Animate -->
< link href = "css/animate.css" rel = "stylesheet" >
<!-- Bootsnav -->
< link href = "css/bootsnav.css" rel = "stylesheet" >
< link href = "css/overwrite.css" rel = "stylesheet" >
< link href = "skins/color.css" rel = "stylesheet" >
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</ head >
< body >
<!-- 导航菜单开始 -->
< nav class = "navbar navbar-default bootsnav" >
< div class = "container" >
<!-- Start Header Navigation -->
< div class = "navbar-header" >
< button type = "button" class = "navbar-toggle" data-toggle = "collapse" data-target = "#navbar-menu" >
< i class = "fa fa-bars" ></ i >
</ button >
< a class = "navbar-brand" href = "#brand" >< img src = "LOGO_ADDRESS" class = "logo" alt = "" ></ a >
</ div >
<!-- End Header Navigation -->
<!-- Start Menu -->
< div class = "collapse navbar-collapse" id = "navbar-menu" >
< ul class = "nav navbar-nav navbar-right" >
< li >< a href = "#" >Home</ a ></ li >
< li >< a href = "#" >About Us</ a ></ li >
< li >< a href = "#" >Services</ a ></ li >
< li >< a href = "#" >Portfolio</ a ></ li >
< li >< a href = "#" >Contact Us</ a ></ li >
</ ul >
</ div >
<!-- End Menu -->
</ div >
</ nav >
<!-- 导航菜单结束 -->
< div class = "clearfix" ></ div >
< div class = "container" >
< div class = "jumbotron" >
< h1 >Hello world</ h1 >
< p >I'm the first content</ p >
</ div >
</ div >
<!-- START JAVASCRIPT -->
<!-- Placed at the end of the document so the pages load faster -->
< script type = "text/javascript" src = "path/to/jquery/1.11.3/jquery.min.js" ></ script >
< script src = "js/bootstrap.min.js" ></ script >
<!-- Bootsnavs -->
< script src = "js/bootsnav.js" ></ script >
</ body >
</ html >
|
可以制作反色的导航菜单:
< nav class = "navbar navbar-inverse bootsnav" >
|
标签:jQuery,插件,navbar,Bootstrap,li,href,div,class,css From: https://www.cnblogs.com/liylllove/p/18576048