Navbar在页面Bootstrap 3.1.1之间切换

时间:2015-06-17 10:44:54

标签: html css twitter-bootstrap

使用bootstrap 3.1.1继续在更改的网站模板上遇到大问题。需要Navbar链接到打开的页面部分以及站点不同页面上的其他部分。导航栏切换到同一页面的部分就好了,但不会切换到其他页面的部分。我无法解决为什么,一切似乎都是正确的?

我很容易混淆,唉

 <nav class="navbar navbar-inverse" role="navigation">
    <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <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="#home">Description</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
     <ul class="nav navbar-nav navbar-right">

        <li><a href="index.html#x">Home</a></li>
        <li><span>/</span></li>
        <li><a href="index.html#a">Description a</a></li>
        <li><span>/</span></li>
        <li><a href="index.html#b">Description b</a></li>
        <li><span>/</span></li>
        <li><a href="page2.html#s">Description c</a></li>
        <li><span>/</span></li>
        <li><a href="page2.html#r">Description d</a></li>
        <li><span>/</span></li>
      </ul>

    </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

0 个答案:

没有答案