1

我正在尝试在导航中使用 twitter bootstrap 让下拉菜单工作,但遇到了麻烦。当我点击“更多...”时,什么也没有出现。

有什么建议吗?

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
    <script src="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.js"></script>   

    <script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>  
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js"></script>

    <link href="bootstrap1.css" rel="stylesheet">



  </head>


<body>
    <!-- Navbar
    ================================================== -->
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
           <a class="brand" href="/">Name</a>
          <div class="nav-collapse collapse">


            <ul class="nav">
              <li class="active">
                <a href="/">Home</a>
              </li>
              <li class="">
                <a href="/browse">Browse</a>
              </li>
              <li class="">
                <a href="/about">About</a>
              </li>

              <li class="">
                <a href="/faq">FAQ</a>
              </li>

              <li>
                <a href="http://submeup.tumblr.com/">Blog</a>
              </li>

              <li class="">
                <a href="/contactinfo">Contact</a>
              </li>


              <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">More...  </a>
                    <ul class="dropdown-menu" >
                        <li>First</li>
                        <li>First</li>
                        <li>First</li>
                        <li>First</li>
                    </ul>
              </li>


            </ul>


                    <ul class="nav pull-right">
                    <li><a href="/accounts/register/">Sign up</a></li>
                    <li class="divider-vertical"></li>
                    <li><a href="/accounts/login/">Login</a></li>
                </ul>

          </div>
        </div>
      </div>
    </div>
4

2 回答 2

1

尝试添加role="menu"<ul class="dropdown-menu" >

于 2012-10-31T00:21:03.607 回答
1

我得到了最新版本的引导程序,它现在似乎可以工作了。

于 2012-10-31T02:35:11.747 回答