bootstrap 4 nav doesn't display hamburger on resize

前端 未结 2 802
感动是毒
感动是毒 2020-11-27 08:58

I\'ve figured how to align the menu items to the right, but when resized the navbar-toggler doesnt appear.

Code:

相关标签:
2条回答
  • 2020-11-27 09:06

    Updated 2018

    The hamburger is there, but it's not visible because the Navbar needs a color, or change the toggler color.

    <nav class="navbar navbar-toggleable-md bg-faded navbar-light">
        ..
    </nav>
    
    • Use navbar-dark to produce light/white colored links and toggler
    • Use navbar-light to produce dark/gray colored links and toggler

    In Bootstrap 4.0.0 navbar-toggleable- has changed to navbar-expand-, but navbar-light and navbar-dark still work the same way...

    <nav class="navbar navbar-expand-md navbar-light bg-light">
        ..
    </nav>
    

    also see: Bootstrap navbar: nothing is displayed on smaller devices

    0 讨论(0)
  • 2020-11-27 09:19

    The code is fine, however I'd stay with the documentation and replace button just after opening tag because it may have something with js loading.

    EDIT: I inspected your website once again and found the button, top right corner! Now all you have to do is change its color and position. Use google chrome dev tools (f12) and searh for it while your window is resized.

    0 讨论(0)
提交回复
热议问题