我正在尝试将 offcanvas 添加到我的引导导航中,响应式效果很好,但是当我尝试桌面分辨率时下拉菜单不起作用。
问题似乎是“bootstrap.offcanvas.js”。
当我删除“bootstrap.offcanvas.js”时,它可以工作。
有什么想法可以解决这个问题吗?
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container menu-height">
<div class="navbar-header">
<button type="button" class="navbar-toggle offcanvas-toggle pull-right" data-toggle="offcanvas" data-target="#js-bootstrap-offcanvas">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://www.irislink.com" class="navbar-brand"><object width="98px" data="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" title="xxxxxxxxxxxxxxxxxxxxxxxxxxxx" type="image/svg+xml"></object></a>
</div>
<!--/.navbar-header -->
<div class="navbar-offcanvas" id="js-bootstrap-offcanvas">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">xxxxxxxxx <b class="caret"></b></a>
<ul class="dropdown-menu" >
<li><a href="#">xxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxxxxxx</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">xxxxxxxxx<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">xxxxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxxx</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">xxxxx <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">xxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxxx</a></li>
<li class="divider"></li>
<li><a href="#">xxxxxx</a></li>
</ul>
</li>
<li class="responsive-online-shop"><div class="box-online-shop"><a class="nav-link btn btn-secondary-outline btn-secondary" href="xxxxxx">xxxxxx</a></div></li>
<li><div class="box-online-flag"><object data="xxxxxxxxxxxxx" type="image/svg+xml"></object><span class="flag-responsive hidden-lg">xxxxxxx</span></div></li>
</ul>
</div>
<!--/.navbar-collapse -->
</div>
</nav>