我试图抓住自举,几乎没有成功。我只是试图获得这个模板的本地版本
http://getbootstrap.com/examples/jumbotron/
我已将html直接复制到html页面,并以与网页相同的顺序引用css和js文件,仅使用我机器上最新下载的副本。但是,当点击下拉菜单旁边的箭头(即不显示菜单)时,没有任何反应
我试图在jsfiddle中重现代码,但是更糟糕的是,根本不显示菜单。 http://jsfiddle.net/andieje/kRX6n/
<!DOCTYPE html> <html> <head><title> Untitled Page </title><link href="styles/bootstrap.css" rel="stylesheet" /> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="JavaScript/html5shiv.js"></script> <script src="JavaScript/respond.min.js"></script> <![endif]--> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Project name</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li class="dropdown-header">Nav header</li> <li><a href="#">Separated link</a></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> <form class="navbar-form navbar-right"> <div class="form-group"> <input type="text" placeholder="Email" class="form-control"> </div> <div class="form-group"> <input type="password" placeholder="Password" class="form-control"> </div> <button type="submit" class="btn btn-success">Sign in</button> </form> </div><!--/.navbar-collapse --> </div> </div> <script type="text/javascript" src="JavaScript/jquery.js" /> <script type="text/javascript" src="JavaScript/bootstrap-min.js" /> <script type="text/javascript" src="JavaScript/bootstrap-dropdown.js" /> </body> </html>
<script type="text/javascript"> $(document).ready(function () { $('.dropdown-toggle').dropdown(); }); </script>