我正在尝试实现Bootstrap的轮播组件。除了幻灯片指示器('.carousel-indicators')没有随着幻灯片循环之外,一切都正常工作。
这是一个完全简化的页面链接:http://dev.magzalez.com/bootstrap-question.html
这是一个完全简化的页面链接:http://dev.magzalez.com/bootstrap-question.html
<!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上示例的完全复制。 有什么想法,为什么它们不会滑动?