我的用于较小屏幕(手机和平板电脑)的导航下拉按钮不起作用。我已经包含了JS文件,但它仍然无法正常工作。任何人都可以帮助确定为什么这不想连接我的js文件。我的用于小屏幕的引导程序导航下拉菜单不起作用
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.mini.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<!-- Header -->
<header>
<nav class="navbar navbar-default navbar-fixed">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">AffAttraction</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a></li>
<li><a href="advertisers.html">Advertisers</a></li>
<li><a href="publishers.html">Publishers</a></li>
<li><a href="blog.html">Blog</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
<form class="navbar-form navbar-right">
<input type="email" name="email" class="form-control" placeholder="Email" required="">
<input type="password" name="password" class="form-control" placeholder="Password" required="">
<button type="submit" class="btn btn-green">Login <span class="glyphicon glyphicon-log-in"></span></button>
</form>
</div>
</div>
</nav>
</header>
<!-- Header -- >
<!-- Showcase -->
<div id="showcase">
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1><span class="highlight">Performance</span> Based Marketing</h1>
<p>Do you have traffic? Let us help you monetize and profit from your websites, apps, games, blogs, and more!</p>
</div>
</div>
</div>
</div>
<!-- Showcase -->
<script src="js/bootstrap.js"></script>
<script src="js/bootstrap.mini.js"></script>
</body>
</html>
我已经在我的下CSS链接顶部包括,如果你认为这可能是一个问题。我也试过把它放在body标签和html标签下面。我迷失在做什么。这些文件确实存在!
使用CDN是可能是好的,但它也需要更多的时间来抓取文件,以及如果文件不存在(由于某种原因,它们的服务器已关闭),然后您的网站无法正常运作。我会坚持我使用的方式来确保我从不依赖于另一台服务器。 –
然后确保在Bootstrap脚本的顶部添加JQuery脚本以便工作:) –