我向 ul 添加了一个新类,并尝试使用 margin: 0 auto 和 text-align: center 设置它的样式,但不起作用..
<section class="navbar navbar-default">
<ul class="nav navbar-nav">
<li class="active"><a href="index.php">Home</a></li>
<li><a href="venue.php">Venue</a></li>
<li><a href="schedule.php">Schedule</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Artists <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li><a href="artists.php" tabindex="-1">All Artists</a></li>
<li class="divider"></li>
<li><a href="#" tabindex="-1">1st</a></li>
<li><a href="#" tabindex="-1">2nd</a></li>
<li><a href="#" tabindex="-1">3rd</a></li>
</ul>
</li>
<li><a href="Register.php">Register</a></li>
</ul>
</section>