Bootstrap _ navigation and bootstrap navigation

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.