无法弄清楚如何使此导航标签成为下拉菜单

时间:2016-10-03 02:22:33

标签: html twitter-bootstrap nav

我还没有能够找出语法 我点击第二个按钮时会出现一个下拉菜单。

select * from database where registered like (select max(registered) from database;

我第一次尝试制作导航菜单。 (出于某种原因,我无法提供此问题而未提供"详细信息"所以请在此原​​谅这个毫无意义的文字)

1 个答案:

答案 0 :(得分:4)

我认为你错过了对汉堡包导航所需的bootstrap javascript库的调用。添加jquery引用(即<script src="...jquery.min.js"...

后尝试添加此项
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

有关详细信息,请参阅Bootstrap文档页面:Getting Started,以及下面的更新代码段。

<link rel="stylesheet" href= "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity=
  "sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin=
  "anonymous" type="text/css" />

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" type=
  "text/javascript">
</script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

  <!-- Font Awesome  -->
  <script src="https://use.fontawesome.com/926120954b.js" type="text/javascript">
</script>

<!-- My CSS  -- >
<link rel="stylesheet" type="text/css" href="mystyle.css">-->
<!--end head: </head>  start body:<body>-->

<ul class="nav nav-tabs">
  <li role="presentation"><a href="#"><i class="fa fa-home fa-1g" aria-hidden="true"></i></a></li>

<!-- ****BEGIN THE DROPDOWN TAB-->

<li role="Presentation" class="dropdown-menu">
    <a class="Pet" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
     Community <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
      <li>item</li>
    </ul>
  </li>

<!-- ***END  THE DROPDOWN TAB  -->
  <li role="presentation"><a href="#">Pet Help</a></li>
  <li role="presentation"><a href="#">Pets for Sale</a></li>
  <li role="presentation"><a href="#">Pet Services</a></li>

</ul>