change bootstrap menu breakpoint

本秂侑毒 提交于 2019-12-13 07:03:37

问题


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:

  1. Edit the files manually - a horribly laborious task and not recommended.
  2. Visit http://getbootstrap.com/customize/, specify your own breakpoints there and download the customised version.
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!