无法进行菜单导航栏下拉菜单

时间:2015-07-03 11:54:11

标签: html css twitter-bootstrap

我无法创建菜单导航栏下拉菜单,这是我的代码:

<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  <ul class="nav navbar-nav">
    <li class="active"><a href="index.html">Home</a>
    </li>
    <li><a href="technology.html">tech</a>
    </li>

    <li class="dropdown">
      <a href="#" class="dropdown-toggle" role="button" data-toggle="dropdown">case <span class="caret"></span></a>
      <ul class="dropdown-menu" role="menu">
        <li role="presentation"><a role="menuitem" href="#">In</a>
        </li>
        <li role="presentation"><a role="menuitem" href="#">Out</a>
        </li>
      </ul>
    </li>

    <li><a href="staff.html">staff</a>
    </li>
    <li><a href="gallery.html">gallery</a>
    </li>
    <li><a href="contact.html">Contact</a>
    </li>
  </ul>
</div>

我想让案例成为一个下拉菜单,但我不能让菜单项“in”和“out”出现,我做错了什么?

1 个答案:

答案 0 :(得分:1)

您的脚本可能未正确加载。我测试了你的代码,它们工作正常。我只添加了以下行来从外部源加载所需的文件:

ContinueWith

Test