Bootstrap _ navigation and bootstrap navigation
I. tab navigation
Label navigation, also known as Tab navigation.
The label navigation is. Nav-tabs"Style. When creating a label-based navigation, you must. Nav.
<ul class="nav nav-tabs"> <li class="active"><a href="##">Home</a></li> <li><a href="##">CSS3</a></li> <li><a href="##">Sass</a></li> <li><a href="##">jQuery</a></li> <li class="disabled"><a href="##">Responsive</a></li></ul>
To set "Home" as the selected item, you only need to add the Class Name ". active" to its label.
<ul class="nav nav-tabs"> <li class="active"><a href="##">Home</a></li> …</ul>
The tab is also disabled. You only need to add ". disabled" to the tab.
<ul class="nav nav-tabs"> <li class="disabled"><a href="##">Home</a></li> …</ul>
2. Capsule navigation
The current item is highlighted with a rounded corner.
The label navigation is. Nav-Pills"Style.
<ul class="nav nav-pills"> <li class="active"><a href="##">Home</a></li> <li><a href="##">CSS3</a></li> <li><a href="##">Sass</a></li> <li><a href="##">jQuery</a></li> <li class="disabled"><a href="##">Responsive</a></li></ul>
3. Navigation of vertical stack
To create a vertical stack navigation, you only need to add a"Nav-stackedClass Name.
<ul class="nav nav-pills nav-stacked"> <li class="active"><a href="##">Home</a></li> <li><a href="##">CSS3</a></li> <li><a href="##">Sass</a></li> <li><a href="##">jQuery</a></li> <li class="disabled"><a href="##">Responsive</a></li></ul>
Iv. Adaptive Navigation
Adaptive Navigation means that the navigation occupies the full width of the container, and the menu items can be adaptive as the cells in the table.
I changed the class name"Nav-justified". Of course, he needs to work with "nav-tabs" or "nav-pills.
<ul class="nav nav-tabs nav-justified"> <li class="active"><a href="##">Home</a></li> <li><a href="##">CSS3</a></li> <li><a href="##">Sass</a></li> <li><a href="##">jQuery</a></li> <li><a href="##">Responsive</a></li></ul>
5. Navigation plus drop-down menu (secondary navigation)
To create a secondary navigation in the Bootstrap framework, you only need to use li as the parent container, use the class name "dropdown", and nest another list ul in li.
<Ul class = "nav-pills"> <li class = "active"> <a href = "##"> homepage </a> </li> <li class = "dropdown"> <a href = "#" class = "dropdown-toggle" data-toggle = "dropdown"> tutorial <span class = "caret"> </span> </a> <ul class = "dropdown-menu"> <li> <a href = "#"> CSS3 </a> </li> <a href = "#"> Sass </a> </li> <a href = "#"> jQuery </a> </li> <li> <a href = "#"> Responsive </a> </li> </ul> </li> <a href = "#"> about we </a> </li> </ul>
6. Bread navigation
Breadcrumb is generally used for navigation. It mainly serves to tell the user the current location of the page ).
In the Bootstrap framework, breadcrumb is also an independent module component. It is easy to use. Add the "breadcrumb" class to ol.
<Ol class = "breadcrumb"> <li> <a href = "#"> homepage </a> </li> <a href = "#"> me </a> </li> <li class = "active"> graphic CSS3 </li> </ol>