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

后端 未结 14 1050
别那么骄傲
别那么骄傲 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 08:52

    Bootstrap 4.x

    It is a snap to change collapse threshold in Bootstrap 4.x. There are 6 cases:

    1. Always expand, never collapse (i.e. breakpoint is 0px):
    2. Breakpoint is sm (576px):
    3. Breakpoint is md (768px):
    4. Breakpoint is lg (992px):
    5. Breakpoint is xl (1200px):
    6. Always collapse, never expand (i.e. breakpoint is ∞px). : (Just remove the navbar-expand-* class. Mobile-first as in Bootstrap 4.x)

    Credit to this article by Carol Skelly I found https://medium.com/wdstack/examples-bootstrap-4-navbar-b3c9dc0edc1a

提交回复
热议问题