简体   繁体   中英

How to reliably change navbar breakpoint (without breaking anything else) in Bootstrap 3

How can one easily alter the collapse breakpoint on bootstrap v3's navbar?

The documentation says

Changing the collapsed mobile navbar breakpoint The navbar collapses into its vertical mobile view when the viewport is narrower than @grid-float-breakpoint, and expands into its horizontal non-mobile view when the viewport is at least @grid-float-breakpoint in width. Adjust this variable in the Less source to control when the navbar collapses/expands. The default value is 768px (the smallest "small" or "tablet" screen).

But there is no LESS file that I can see and I really want to create a custom file to override this behaviour rather than mess around with the source files.

Specifically within the Bootstrap gem file structure, I am looking for the @grid-float-breakpoint variable.

If you're compiling from source (LESS files). Just open variables.less and search for the @grid-float-breakpoint.

Its default value should be @screen-sm-min, you're free to change this to any value compatible - a variable or a static value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM