How do I get the navigation to collapse into the small icon for mobile devices?

后端 未结 4 933
时光说笑
时光说笑 2021-02-04 13:53

If you go on Twitter-Bootstrap website and reduce the window size below 1024x768, the navigation will change into an icon that you click for it. Is this one of the javascript pl

4条回答
  •  时光说笑
    2021-02-04 14:13

    The navigation requires the nav-collapse property along with the .btn as well. This is an example:

    
    

    http://twitter.github.com/bootstrap/components.html#navbar for more details about collapsing the navigation.

    SIDE NOTE Oct 3, 2012

    I just started to make this with another application and ran into some trouble using the minimized files so I suggest you stick to the regular if your having issues even when everything is setup correctly. Here is my application.css now:

    /*
     *= require_self
     *= require bootstrap
     *= require bootstrap-responsive
     *= require_tree .
     */
    body { 
        padding-top: 60px; # this is for fixed-top navigation
    }
    

提交回复
热议问题