我正在尝试从 Bootstrap 实现轮播。
一切正常,除了轮播指示器('.carousel-indicators')没有与幻灯片一起循环。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, width=device-width">
<meta name="description" content="">
<title>Test Home Page</title>
<link href="http://s3.amazonaws.com/stockpr-test-store/esph2/files/css/bootstrap.min.css" rel="stylesheet" media="screen">
<style>
li.active {
color:red;
}
</style>
</head>
<body>
<div class="container">
<h1>Test</h1>
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item"><img src="http://dummyimage.com/960x500/fff/000" alt="Slide 1"></div>
<div class="item"><img src="http://dummyimage.com/960x500/fff/000" alt="Slide 2"></div>
<div class="item"><img src="http://dummyimage.com/960x500/fff/000" alt="Slide 3"></div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
</div><!--//container-->
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://s3.amazonaws.com/stockpr-test-store/esph2/files/js/bootstrap.min.js"></script>
<script>
$('.carousel').carousel();
</script>
</body>
这几乎与http://twitter.github.com/bootstrap/javascript.html#carousel上的示例完全相同。关于为什么他们不会滑动的任何想法?