Change bootstrap navbar collapse breakpoint without using LESS

前端 未结 19 2215
囚心锁ツ
囚心锁ツ 2020-11-22 07:55

Currently when the browser width drops below 768px, the navbar changes to collapsed mode. I want to change this width to 1000px so when the browser is below 1000px the navba

19条回答
  •  情歌与酒
    2020-11-22 08:32

    Navbars can utilize .navbar-toggler, .navbar-collapse, and .navbar-expand{-sm|-md|-lg|-xl} classes to change when their content collapses behind a button. In combination with other utilities, you can easily choose when to show or hide particular elements.

    For navbars that never collapse, add the .navbar-expand class on the navbar. For navbars that always collapse, don’t add any .navbar-expand class.

    For example :

    
    

    Mobile menu is showing in large screen.

    Reference : https://getbootstrap.com/docs/4.0/components/navbar/

提交回复
热议问题