问题
I'm using bootstrap 3.2 and the default breakpoints. I would like the navbar to collapse into mobile mode at md (< 992px) instead of sm (< 767px) without changing the default breakpoints. How do I do that best?
回答1:
You have 3 options:
- Edit the files manually - a horribly laborious task and not recommended.
- Visit http://getbootstrap.com/customize/, specify your own breakpoints there and download the customised version.
- Use a CSS preprocessor and customise it at your end. Bootstrap provide versions for both Less and Sass.
Note that for option 2 and 3, you are looking to change the @grid-float-breakpoint variable. In your example, you want to change the value from @screen-sm-min to @screen-md-min
来源:https://stackoverflow.com/questions/26649090/change-bootstrap-menu-breakpoint