我正在尝试创建一个响应式导航栏,左侧和右侧都有图标,名称在中心对齐。
尝试实现 - http://i40.tinypic.com/2j3o9rb.jpg 目前的输出 - http://i42.tinypic.com/1z3pbuh.jpg
请帮我解决这个问题
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-brand" style="display: inline-block">
<img class="logo" src="img/qc-icon.png" />
</div>
<div class="container">
<div style="text-align:center">
<span>Name</span>
<span class="pull-right"><img src="img/qc-icon.png" /></span>
</div>
</div>
</div>
感谢 jetin
答案 0 :(得分:0)
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="collapse navbar-collapse pull-left">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
<div class="col-md-4">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project name</a>
</div>
</div>
<div class="col-md-4">
<ul class="nav navbar-nav pull-right">
<li class=""><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
</div>