Bootstrap-- navigation bar (navbar)

Navigation bar and navigation from the difference in appearance is not too much, but in actual use the navigation bar navigation is much more complicated than that. 

Navigation (Navbar) has a background color, and the navigation bar may be a pure link (similar navigation), in conjunction with other forms as well as forms and navigation forms.

In the production of a basic navigation bar is divided into the following steps:

  • First, add the class name navbar-nav on the list (<ul class = 'nav'>) making navigation;
  • Add a container (NAV) in the external list, using the class name and navbar navbar-default.
  • <nav class="navbar navbar-default"> 
        <ul class="nav navbar-nav">
            <li><a href="#">首页</a></li>
            ...
        </ul>
    </nav>

     

    If we want to fix in the top or bottom of the browser, Bootstrap framework navigation bar provides two ways to fix the navigation bar:

    • Fixed on the top navigation, the following will be automatically move
    <nav class="navbar navbar-default navbar-fixed-top">

     

    • The patch on the bottom navigation
    <nav class="navbar navbar-default navbar-fixed-bottom">

     

Guess you like

Origin www.cnblogs.com/LinWenQuan/p/11618696.html