我正在使用bootstrap在mijn应用程序中有一个侧面导航栏。我希望下拉菜单默认打开,但我无法解决这个问题......
我的代码:
<nav class="navbar navbar-default sidebar" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-sidebar-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-sidebar-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="{{ url('/') }}">Home of {{ Auth::user()->name }}<span style="font-size:16px;"></span></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Input <span class="caret"></span><span style="font-size:16px;"></span></a>
<ul class="dropdown-menu forAnimate" role="menu">
<li><a href="{{ url('/dashboard/input') }}">Form</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" >Results <span class="caret"></span><span style="font-size:16px;"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ url('/dashboard/result/overview') }}">Results</a></li>
</ul>
</li>
<li><a href="{{ url('/') }}">Tools<span></span></a></li>
<li><a href="{{ url('/documentation') }}">Documentation<span></span></a></li>
@endif
</ul>
</div>
</div>
</nav>
答案 0 :(得分:2)
尝试更改
<li class="dropdown">
到
<li class="dropdown open">