Bootstrap 4 - Fullscreen mobile navbar

前端 未结 2 1273
不思量自难忘°
不思量自难忘° 2020-12-28 10:59

I\'m trying to figure out how I can do a fullscreen menu (navbar) on mobile size, with this I mean that when you press on the \'hamburger-menu\' the navbar (with the items)

2条回答
  •  不知归路
    2020-12-28 11:53

    In your code you have done some impressive amount of work. I haven't gone through the whole code, instead I just added the following css:

    .navbar-nav {
      height: 100vh !important;
    }
    

    This will work on any bootstrap 4 project as Bootstrap 4 stands today. Below is a pic of sample code with the highlighted class that I have modified, doing the same should work for most people and give the smooth transition from bootstrap without wanting to use JS or modify anything major.

    Hope it helps everyone.

提交回复
热议问题