Ash*_*own 0 html javascript jquery carousel twitter-bootstrap
我似乎遇到了Bootstrap旋转木马的问题.我最后一次实现一个是当我使用Bootstrap 2.xx时.从2.xx示例代码页中翻录工作正常.但是,当我这样做时,旋转木马似乎不起作用.不滑,没有.我已经包含了Bootstrap 3 CDN和路径工作.我还在页面底部包含了Jquery,这是他们用代码提供的那个,它仍然是一个实时链接.任何解决方案/建议都非常感谢.
谢谢
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Veyern Gaming</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">>
<link rel="stylesheet" href="css/style.css"/>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<!--Navbar-->
<div class="navbar">
<ul class="nav navbar-nav">
<li class="active"><a href="/index.html>Home</a></li>
<li><a href="">Forum</a></li>
<li><a href="">Vote</a></li>
<li><a href="">Store</a></li>
<li><a href="">Stats</a></li>
</ul>
</div>
<!--Image Slider-->
<div id="carousel-example-generic" class="carousel slide">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="http://placehold.it/300x100" alt="">
</div>
<div class="item">
<img src="http://placehold.it/300x100" alt="">
</div>
<div class="item">
<img src="http://placehold.it/300x100" alt="">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
</div>
<!-- Scripts-->
<script src="http://code.jquery.com/jquery.js"></script>
</body>
<html>
Run Code Online (Sandbox Code Playgroud)
Bootstrap的JavaScript组件依赖于jQuery,因此您必须在加载组件之前加载库.
从Bootstrap文档:
插件依赖项
一些插件和CSS组件依赖于其他插件.如果单独包含插件,请确保在文档中检查这些依赖项.另请注意,所有插件都依赖于jQuery(这意味着必须在插件文件之前包含jQuery).
没有理由你的结束部分看起来不像:
</div>
</div>
<!-- Scripts-->
<script src="http://code.jquery.com/jquery.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
</body>
<html>
Run Code Online (Sandbox Code Playgroud)