2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
									
										
										
										
											2015-08-15 13:45:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								layout: docs
							 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:52:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								title: Navbar
							 
						 
					
						
							
								
									
										
										
										
											2016-10-03 09:19:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								description: Documentation and examples for Bootstrap's powerful, responsive navigation header.
							 
						 
					
						
							
								
									
										
										
										
											2015-08-06 08:47:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								group: components
							 
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The navbar is a simple wrapper for positioning branding, navigation, and other elements into a concise navigation header. It's easily extensible and, with the help of our collapse plugin, it can easily integrate offscreen content.
							 
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-05-29 16:58:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Contents
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								*  Will be replaced with the ToC, excluding the "Contents" header 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{:toc}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Basics
  
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Here's what you need to know before getting started with the navbar:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-10-31 08:54:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Navbars require a wrapping `.navbar`  and a [color scheme ](#color-schemes ). 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Navbars and their contents are fluid by default. Use [optional containers ](#containers ) to limit their horizontal width. 
						 
					
						
							
								
									
										
										
										
											2015-11-25 18:32:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Use `.pull-*-left`  and `.pull-*-right`  to quickly align sub-components. 
						 
					
						
							
								
									
										
										
										
											2014-12-01 12:17:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  Ensure accessibility by using a `<nav>`  element or, if using a more generic element such as a `<div>` , add a `role="navigation"`  to every navbar to explicitly identify it as a landmark region for users of assistive technologies. 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Supported content
  
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Navbars come with built-in support for a handful of sub-components. Mix and match from the following as you need:
							 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  `.navbar-brand`  for your company, product, or project name 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  `.navbar-nav`  for a full-height and lightweight navigation (including support for dropdowns) 
						 
					
						
							
								
									
										
										
										
											2016-10-04 00:55:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								-  `.navbar-toggler`  for use with our collapse plugin and other [navigation toggling ](#collapsible-content ) behaviors. 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Here's an example of all the sub-components included in a default, light navbar:
							 
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < a  class = "navbar-brand"  href = "#" > Navbar< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < ul  class = "nav navbar-nav" > 
							 
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < li  class = "nav-item active" > 
							 
						 
					
						
							
								
									
										
										
										
											2014-12-01 12:17:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > Home < span  class = "sr-only" > (current)< / span > < / a > 
							 
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > Features< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > Pricing< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > About< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / ul > 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-26 15:54:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < form  class = "form-inline float-xs-right" > 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < input  class = "form-control"  type = "text"  placeholder = "Search" > 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-06 17:32:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < button  class = "btn btn-outline-success"  type = "submit" > Search< / button > 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < / form > 
							 
						 
					
						
							
								
									
										
										
										
											2014-12-01 12:17:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-12-07 14:34:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### Brand
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-02-09 14:13:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The `.navbar-brand`  can be applied to most elements, but an anchor works best as some elements might require utility classes or custom styles.
							 
						 
					
						
							
								
									
										
										
										
											2015-12-07 14:34:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < a  class = "navbar-brand"  href = "#" > Navbar< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
									
										
										
										
											2016-09-09 13:16:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < h1  class = "navbar-brand mb-0" > Navbar< / h1 > 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-07 14:34:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Nav
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Navbar navigation is similar to our regular nav options—use the `.nav`  base class with a modifier to achieve a particular look. In this case you'll want `.nav.navbar-nav` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < ul  class = "nav navbar-nav" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < li  class = "nav-item active" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > Home < span  class = "sr-only" > (current)< / span > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > Features< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > Pricing< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < a  class = "nav-link"  href = "#" > About< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / ul > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-12-08 16:36:42 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								And because we use classes for our navs, you can avoid the list-based approach entirely if you like.
							 
						 
					
						
							
								
									
										
										
										
											2015-12-07 14:34:06 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < div  class = "nav navbar-nav" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "nav-item nav-link active"  href = "#" > Home < span  class = "sr-only" > (current)< / span > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "nav-item nav-link"  href = "#" > Features< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "nav-item nav-link"  href = "#" > Pricing< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "nav-item nav-link"  href = "#" > About< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / div > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Color schemes
  
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Theming the navbar has never been easier thanks to the combination of a simple link color modifier class and `background-color`  utilities. Put another way, you specify light or dark and apply a background color.
							 
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Here are some examples to show what we mean.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< div  class = "bd-example" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < nav  class = "navbar navbar-dark bg-inverse" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "navbar-brand"  href = "#" > Navbar< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < ul  class = "nav navbar-nav" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item active" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Home < span  class = "sr-only" > (current)< / span > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Features< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Pricing< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > About< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / ul > 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-26 15:54:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < form  class = "form-inline float-xs-right" > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < input  class = "form-control"  type = "text"  placeholder = "Search" > 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-06 17:32:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < button  class = "btn btn-outline-info"  type = "submit" > Search< / button > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < / form > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / nav > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < nav  class = "navbar navbar-dark bg-primary" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "navbar-brand"  href = "#" > Navbar< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < ul  class = "nav navbar-nav" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item active" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Home < span  class = "sr-only" > (current)< / span > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Features< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Pricing< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > About< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / ul > 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-26 15:54:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < form  class = "form-inline float-xs-right" > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < input  class = "form-control"  type = "text"  placeholder = "Search" > 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-06 17:32:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < button  class = "btn btn-outline-secondary"  type = "submit" > Search< / button > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < / form > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / nav > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < nav  class = "navbar navbar-light"  style = "background-color:  #e3f2fd ;" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "navbar-brand"  href = "#" > Navbar< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < ul  class = "nav navbar-nav" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item active" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Home < span  class = "sr-only" > (current)< / span > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Features< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Pricing< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > About< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / ul > 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-26 15:54:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < form  class = "form-inline float-xs-right" > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < input  class = "form-control"  type = "text"  placeholder = "Search" > 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-06 17:32:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < button  class = "btn btn-outline-primary"  type = "submit" > Search< / button > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < / form > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / nav > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / div >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% highlight html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-dark bg-inverse" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  <!--  Navbar content  --> 
							 
						 
					
						
							
								
									
										
										
										
											2014-12-01 12:17:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-dark bg-primary" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  <!--  Navbar content  --> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light"  style = "background-color:  #e3f2fd ;" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  <!--  Navbar content  --> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endhighlight %}
							 
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Containers
  
						 
					
						
							
								
									
										
										
										
											2015-06-23 07:30:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-12-07 14:47:23 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Although it's not required, you can wrap a navbar in a `.container`  to center it on a page or add one within to only center the contents of a [fixed or static top navbar ](#placement ).
							 
						 
					
						
							
								
									
										
										
										
											2015-04-19 09:12:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< div  class = "container" >  
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < nav  class = "navbar navbar-light bg-faded" > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  class = "navbar-brand"  href = "#" > Navbar< / a > 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 14:24:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < / nav > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / div >  
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 14:24:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < div  class = "container" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < a  class = "navbar-brand"  href = "#" > Navbar< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / div > 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-19 09:12:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
									
										
										
										
											2015-04-19 09:12:10 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 16:18:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Placement
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-09-06 11:58:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Navbars can be statically placed (their default behavior), static without rounded corners, or fixed to the top or bottom of the viewport.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-full navbar-light bg-faded" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < a  class = "navbar-brand"  href = "#" > Full width< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 16:18:21 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-fixed-top navbar-light bg-faded" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < a  class = "navbar-brand"  href = "#" > Fixed top< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-fixed-bottom navbar-light bg-faded" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < a  class = "navbar-brand"  href = "#" > Fixed bottom< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Collapsible content
  
						 
					
						
							
								
									
										
										
										
											2014-07-14 14:33:54 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-01 12:17:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Our collapse plugin allows you to use a `<button>`  or `<a>`  to toggle hidden content.
							 
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
									
										
										
										
											2016-07-08 16:54:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < button  class = "navbar-toggler"  type = "button"  data-toggle = "collapse"  data-target = "#exCollapsingNavbar"  aria-controls = "exCollapsingNavbar"  aria-expanded = "false"  aria-label = "Toggle navigation" > < / button > 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-25 02:10:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < div  class = "collapse"  id = "exCollapsingNavbar" > 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-09 13:16:28 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < div  class = "bg-inverse p-1" > 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-25 02:10:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      < h4 > Collapsed content< / h4 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < span  class = "text-muted" > Toggleable via the navbar brand.< / span > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / div > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  < / div > 
							 
						 
					
						
							
								
									
										
										
										
											2014-12-01 12:17:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
									
										
										
										
											2014-10-27 19:49:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{% endexample %}
							 
						 
					
						
							
								
									
										
										
										
											2015-04-17 09:50:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								For more complex navbar patterns, like those used in Bootstrap v3, use the `.navbar-toggleable-*`  classes in conjunction with the `.navbar-toggler` . These classes override our responsive utilities to show navigation only when content is meant to be shown.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% example html %}
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 15:46:29 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								< nav  class = "navbar navbar-light bg-faded" >  
						 
					
						
							
								
									
										
										
										
											2016-07-08 16:54:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < button  class = "navbar-toggler hidden-sm-up"  type = "button"  data-toggle = "collapse"  data-target = "#exCollapsingNavbar2"  aria-controls = "exCollapsingNavbar2"  aria-expanded = "false"  aria-label = "Toggle navigation" > < / button > 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-17 09:50:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < div  class = "collapse navbar-toggleable-xs"  id = "exCollapsingNavbar2" > 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-18 14:43:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    < a  class = "navbar-brand"  href = "#" > Responsive navbar< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < ul  class = "nav navbar-nav" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item active" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Home < span  class = "sr-only" > (current)< / span > < / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Features< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > Pricing< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < li  class = "nav-item" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        < a  class = "nav-link"  href = "#" > About< / a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      < / li > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    < / ul > 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-17 09:50:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  < / div > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								< / nav >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{% endexample %}