Html 引导导航栏右侧不工作

Html 引导导航栏右侧不工作,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我刚开始使用bootstrap,我尝试了一些东西,发现了一个问题 我有两个不同的导航栏标题类,我想把它放在左边和右边,我想它是响应 <nav class="navbar navbar-default navbar-fixed-top topnav " style="opacity:0.8" role="navigation"> <div class="container " > <!-- Brand and toggle get groupe

我刚开始使用bootstrap,我尝试了一些东西,发现了一个问题

我有两个不同的导航栏标题类,我想把它放在左边和右边,我想它是响应

<nav class="navbar navbar-default navbar-fixed-top topnav " style="opacity:0.8" role="navigation">
    <div class="container " >
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class=" topnav" href="#">image1</a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="navbar-right" >
            <a class=" topnav" href="#">image2</a>
        </div>

    </div>
    <!-- /.container -->
</nav>

当我在移动设备中查看它时,视图右侧部分位于底部,但我希望它在移动设备和桌面视图中都位于顶部

非常感谢您的帮助
谢谢

试着将它们包装成一行,然后放在X列-*类中

<nav class="navbar navbar-default navbar-fixed-top topnav "     style="opacity:0.8" role="navigation">
    <div class="container" >
      <div class="row">

        <div class="col-xs-6">
          <!-- Brand and toggle get grouped for better mobile display -->
          <div class="navbar-header">
              <a class=" topnav" href="#">image1</a>
          </div>              
        </div>

        <div class="col-xs-6">
          <!-- Collect the nav links, forms, and other content for toggling -->
          <div class="navbar-right" >
              <a class=" topnav" href="#">image2</a>
          </div>              
        </div>

      </div><!--./row-->
    </div><!--./container-->
</nav>


这不是最好的选择,但是,请尝试此=)

<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top topnav " style="opacity:0.8" role="navigation">
    <div class="container " >

      <div class=row>

        <div class="col-xs-6">
          <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class=" topnav" href="#">image1</a>
        </div>
        </div>


        <div class="col-xs-6">
          <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="navbar-right" >
            <a class=" topnav" href="#">image2</a>
        </div>
        </div>

      </div>

    </div>
    <!-- /.container -->
</nav>