我试图在左侧创建一个包含链接的标题,但在右侧创建一个链接,当我尝试使用导航栏时,它只移动少量几乎没有做任何事情,这是我的第一次使用bootstrap所以任何帮助表示赞赏。
<div class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link" href="#">Home</a>
@can('create', App\User::class)
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Appointment</a>
<div class="dropdown-menu">
<a class="dropdown-item" a href="{{url('addappointment')}}">Create Appointment</a>
@endcan
@can('delete', App\User::class)
<a class="dropdown-item" a href="{{url('deleteappointmentform')}}">Cancel Appointment</a>
</div>
@endcan
</li>
@can('create', App\User::class)
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Patient</a>
<div class="dropdown-menu">
<a class="dropdown-item" a href="{{url('registerForm')}}">Register Patient</a>
@endcan
@can('delete', App\User::class)
<a class="dropdown-item" a href="{{url('deletePatientForm')}}">Remove Patient</a>
</div>
@endcan
</li>
------------------这是我与之斗争的具体部分----------------- ------
<ul class="nav-item dropdown navbar-right">
<a class="nav-link dropdown-toggle " data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">{{Auth::user()->firstname}} {{Auth::user()->surname}}</a>
<div class="dropdown-menu">
<a class="dropdown-item" a href="{{url('userdetails/'.Auth::user()->id)}}">My Details</a>
<a class="dropdown-item" a href="{{url('getLogout')}}">Log out</a>
</div>
</ul>
</div>
答案 0 :(得分:0)
对于任何想知道我发现添加了类&#34; navbar-toggler-right&#34;解决了我的问题