3

http://jsfiddle.net/Cwf4W/10/

有我的代码我似乎无法让引导下拉菜单工作,有什么帮助吗?我很确定我已经把所有的 js 和 css 都做好了,我已经找了一段时间了:o

    <!-- BOOTSTRAP -->
        <div class="navbar navbar-inverse" style="position: static;">
          <div class="navbar-inner">
            <div class="container">
              <a class="btn btn-navbar" data-toggle="collapse" data-target=".subnav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </a>
              <a class="brand" href="#">Project Stalk</a>
              <div class="nav-collapse subnav-collapse">
                <ul class="nav">
                  <li class="active"><a href="#">Home</a></li>
                  <li><a href="#">About</a></li>
                  <li><a href="#">Contact</a></li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Settings <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li><a href="#">Account settings</a></li>
                      <li><a href="#">Privacy settings</a></li>
                      <li><a href="#">Logout</a></li>
                      <li class="divider"></li>
                      <li class="nav-header">Nav header</li>
                      <li><a href="#">Separated link</a></li>
                      <li><a href="#">One more separated link</a></li>
                    </ul>
                  </li>
                </ul>
                <form class="navbar-search pull-left" action="">
                  <input type="text" class="search-query span2" placeholder="Search">
                </form>
                <ul class="nav pull-right">
                  <li><a href="#">Link</a></li>
                  <li class="divider-vertical"></li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li><a href="#">Action</a></li>
                      <li><a href="#">Another action</a></li>
                      <li><a href="#">Something else here</a></li>
                      <li class="divider"></li>
                      <li><a href="#">Separated link</a></li>
                    </ul>
                  </li>
                </ul>
              </div><!-- /.nav-collapse -->
            </div>
          </div><!-- /navbar-inner -->
        </div><!-- /navbar -->      
4

1 回答 1

1

您的代码看起来正确,但包括http://www.sieuphan.com/bootstrap/bootstrap-dropdown.js在内的几个 javascript 文件返回错误 404

开发控制台清楚地显示这些错误(例如在 Chrome 中“查看 > 开发人员 > Javascript 控制台”)

于 2012-10-20T05:50:03.103 回答