Bootstrap切换导航按钮未显示或正在工作

时间:2014-12-26 00:20:48

标签: jquery html twitter-bootstrap

无论我做什么,我都无法显示切换导航按钮。导航栏折叠,但汉堡包图标没有显示 - 而是有一个小的半透明黑盒子,无法点击。

编辑:忘了提到Bootstrap和JQuery实际上都是在文档末尾加载的。

EDIT2:原来切换不起作用,因为我的路径错了(呃)。 但现在我仍然看不到汉堡包图标,只有一个小黑盒而不是它。

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="icon" href="../../favicon.ico">

        <title>New Mayor of New York</title>

        <!-- Bootstrap core CSS -->
        <link href="css/bootstrap.min.css" rel="stylesheet">

        <!-- Custom styles for this template -->
        <link href="css/main.css" rel="stylesheet">
        <link href="css/social-buttons.css" rel="stylesheet">

        <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
        <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
        <script src="js/ie-emulation-modes-warning.js"></script>

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
        <link href='http://fonts.googleapis.com/css?family=Playfair+Display:400,900italic' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=Lato:400' rel='stylesheet' type='text/css'>
      </head>

      <body>
        <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
          <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapse">
                <span class="sr-only">Toggle navigation</span>
              </button>
              <a class="navbar-brand" href="#" id="name">New Mayor of New York</a>

            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="collapse">
              <ul class="nav navbar-nav" id="menu">
                <li class="menu-item"><a href="#">Watch Now</a></li>
                <li class="menu-item"><a href="#">Cast and Crew</a></li>
                <li class="menu-item"><a href="#">Photos</a></li>
                <li class="menu-item"><a href="#">Tell Your Friends</a></li>
                <li class="menu-item"><a href="#">Our Backers</a></li>
              </ul>
            </div><!-- /.navbar-collapse -->
          </div><!-- /.container-fluid -->
        </nav>

0 个答案:

没有答案