我有以下代码:
<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。 最后,当我下载了它,并为我的画廊的图像的文件夹调用与haphling图像TB的img了。
基本上,它看起来像这样:
当我点击箭头,图像也不会改变。 另外,我想箭头是图像中,不脱到这样的权利。