Bootstrap dropdown in collapse not showing on first attempt

前端 未结 1 2025
走了就别回头了
走了就别回头了 2020-12-10 14:50

I have a dropdown menu inside a nav-collapse.

When I reduce the window\'s width (eg: 700px), the navbar correctly collapses, then I click on btn-navbar to un-collaps

相关标签:
1条回答
  • 2020-12-10 15:11

    A lot of people were reporting this as a bug on the repo (eg. Issue #5671, Issue #5890, Issue #6019).

    In response to #5671, someone points out that as per the docs on responsive Navbar, when using the class navbar-collapse you must also include collapse. Seems that your example suffers from this same (albeit easily overlooked) flaw.

    Here's a working example of your code, the only difference being adding the collapse class:

    Plunker

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