How to change navbar collapse threshold using Twitter bootstrap-responsive?

后端 未结 14 1072
别那么骄傲
别那么骄傲 2020-12-04 08:18

I\'m using Twitter Bootstrap 2.0.1 in a Rails 3.1.2 project, implemented with bootstrap-sass. I\'m loading both the bootstrap.css and the bootstrap-respon

14条回答
  •  没有蜡笔的小新
    2020-12-04 09:09

    Bootstrap > 2.1 && < 3

    • Use the less version of bootstrap
    • Change the @navbarCollapseWidth variable in variables.less
    • Recompile.

    Update 2013: The easy way

    • Visit http://getbootstrap.com/customize/#less-variables
    • Change @navbarCollapseWidth in the formfield
    • Click "Compile and Download".

    (THX to Archonic via comment)

    Update 2014: Bootstrap 3.1.1 and 3.2 (they even added it to the documentation)

    If you're customizing or overriding/editing .less variables, you're looking for:

    //** Point at which the navbar becomes uncollapsed.
    @grid-float-breakpoint:     @screen-sm-min;
    //** Point at which the navbar begins collapsing.
    @grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
    

提交回复
热议问题