我有以下代碼:爲什麼Twitter Bootstrap的輪播不適合我?
<html>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(document).ready(function(){
$('.carousel').carousel();
});
</script>
</head>
<body>
<div id="welcome-carousel" class="carousel slide"><!-- class of slide for animation -->
<div class="carousel-inner">
<div class="item active"><!-- class of active since it's the first item -->
<img src="img/image1.png" alt="" />
</div>
<div class="item">
<img src="img/image4.png" alt="" />
</div>
<div class="item">
<img src="img/image3.png" alt="" />
<div class="carousel-caption">
<p>Hello to the WORLD!</p>
</div>
</div>
<div class="item">
<img src="img/image2.png" alt="" />
<div class="carousel-caption">
<p>Hello to the WORLD!</p>
</div>
</div>
<div class="item">
<img src="img/image1.png" alt="" />
<div class="carousel-caption">
<p>Hello to the WORLD!</p>
</div>
</div>
</div><!-- /.carousel-inner -->
<!-- Next and Previous controls below
href values must reference the id for this carousel -->
<a class="carousel-control left" href="#welcome-carousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#welcome-carousel" data-slide="next">›</a>
</div>
</body>
</html>
這是一個index.html文件。在同一個目錄中有一個名爲js的目錄,其中包含boostrap.min.js,以及一個名爲css的css目錄,其中包含boostrap.min.css。最後,一個文件夾呼叫img,當我下載它時,TB給出的圖像和我的畫廊的圖像。
基本上,它看起來像這樣:
當我點擊箭頭,圖像也不會改變。另外,我希望箭頭位於圖像內,而不是像這樣。
控制檯中的任何錯誤?你似乎在跟隨結核病的例子,很難看到。你有沒有改變它來完全複製這個例子? – nickhar
另請參閱:// // ajax.googleapis.com !??前綴與'http:' – nickhar