0

我正在尝试创建一个响应式导航栏,左侧和右侧都有图标,名称居中对齐。

试图实现 - 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>

谢谢杰廷

4

1 回答 1

0

http://www.bootply.com/117643

    <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>
于 2014-02-28T15:39:53.487 回答