我試圖將鏈接從導航欄左側移動到右側,它不會讓我。我嘗試將它向右移動,沒有發生任何事情,與位置相同:相對;右:200px;和填充權:-200px ;.如果有人有任何其他建議,將不勝感激,謝謝。Bootstrap 4 - 用切換按鈕將鏈接移動到導航欄右側
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html">
<img id="logo" src="images/logo.png" width="200" class="d-inline-block align-top" alt="">
</a>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link active text-white" href="index.html">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="services.html">Services</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="portfolio.html">Portfolio</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="about.html">About</a>
</li>
</ul>
</div>
</nav>
在jsfiddle中確認:https://jsfiddle.net/sayLz41a/ – haxxxton
修改後的jsfiddle https:// jsfi ddle.net/sayLz41a/1/(帶白色導航欄上的黑色文本而不是白色導航欄上的白色文本) – DestinatioN
非常感謝! :) –