我想在导航栏的右侧放置两个文本链接。
注册|联系我们
我将如何基于bootply来执行此操作?
这是我的bootply:
http://www.bootply.com/waaBbWFaI1
这是我的HTML:
<!-- Navigation -->
<nav class="navbar navbar-default" role="navigation">
<div class="container topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-brand">
<img class="img-responsive" src="https://red.org/wp-content/plugins/a8c-stripe/img/red_logo.png" alt="Onvia Exchange">
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
最佳答案
在引导程序3中,您可以使用类nav navbar-nav navbar-right
的无序列表,如下所示。 (单击全屏,以便可以在桌面视图中看到它)
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<!-- Navigation -->
<nav class="navbar navbar-default" role="navigation">
<div class="container topnav">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-brand">
<img class="img-responsive" src="https://red.org/wp-content/plugins/a8c-stripe/img/red_logo.png" alt="Onvia Exchange">
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">Home</a>
</li>
<li><a href="#">Register</a>
</li>
<li><a href="#">Contact Us</a>
</li>
</ul>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>