Code for the header navigation of common bootstrap components and the bootstrap navigation

Source: Internet
Author: User

Code for the header navigation of common bootstrap components and the bootstrap navigation

The following is the code for the header navigation. I will briefly explain some common attributes.

Total effect:

The Code is as follows:

<Nav class = "navbar-default navbar-inverse navbar-fixed-top"> // navbar-inverse sets the background // navbar-fixed-top sets the header to be fixed on the top, therefore, you need to set the top padding for the body, which is usually set to padding-top: 60px <div class = "Container-fluid"> // container-fluid specifies whether the content of the navigation bar has a certain inner spacing. If class = "container-fluid", no inner spacing exists, keep the content close to the left. // If class = "container" is set, the content has a certain padding and the content is symmetric and centered. <! -- Brand and toggle get grouped for better mobile display --> <div class = "navbar-header"> <button type = "button" class = "navbar-toggle collapsed" data-toggle = "collapse" data-target = "# bs-example-navbar-collapse-1" aria-expanded = "false"> <span class = "sr-only"> Toggle navigation </span> <span class = "icon-bar"> </span> <span class = "icon-bar"> </span> <span class = "icon-bar"> </span> </ button> // here is the response method, on a small screen Three-shot display, no need to change <a class = "navbar-brand" href = "#" rel = "external nofollow" rel = "external nofollow"> a Management System </a> </div> <! -- Collect the nav links, forms, and other content for toggling --> <div class = "collapse navbar-collapse" id = "bs-example-navbar-collapse-1"> <ul class = "nav navbar-nav"> <li class = "active "> <a href =" # "rel =" external nofollow "=" external nofollow "rel =" external nofollow "rel = "external nofollow" rel = "external nofollow" rel = "external nofollow"> homepage <span Class = "sr-only"> (current) </span> </a> </li> <li class = "dropdown"> <a href = "#" rel = "external nofollow" rel = "external nofollow" rel = "external nofollow" rel = "external nofollow" class = "dropdown- toggle "data-toggle =" dropdown "role =" button "aria-haspopup =" true "aria-expanded =" false "> function <span class =" caret "> </ sp An> </a> <ul class = "dropdown-menu"> <li class = "dropdown-header"> business functions </li> <a href =" # "rel =" external nofollow "rel =" external nofollow "rel = "external nofollow" rel = "external nofollow"> information creation </a> </li> <a href = "#" rel = "external nofollow" rel =" external nofollow "rel =" external nofollow "rel =" external n Ofollow "rel =" external nofollow "rel =" external nofollow "> Information Query </a> </li> <li> <a href = "#" rel = "external nofollow" rel =" external nofollow "rel =" external nofollow "rel =" external nofollow "> information management </a> </li> <li role =" separator "class =" divider "> </li> <li class = "dro Pdown-header "> system functions </li> <a href =" # "rel =" external nofollow "rel = "external nofollow" rel = "external nofollow"> Settings </a> </li> <li role = "separator" class = "divider"> </li> </ul> </li> <a href = "#" rel = "external nofollow" rel = "external nofollow" rel = "external nofollow" rel = "extern Al nofollow "rel =" external nofollow "rel =" external nofollow "> help </a> </li> </ul> <form class = "navbar-form navbar-left pull-right"> <div class = "form-group"> <input type = "text" class = "form-control "placeholder =" username... "> <input type =" password "class =" form-control "placeholder =" password... "> </div> <button type =" submit "class =" btn-default "> Login </Button> </form> </div> <! --/. Navbar-collapse --> </div> <! --/. Container-fluid --> </nav>

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.