我知道很多人已经问过,但我都检查了这个网站和其他人,但无法找到解决方案。 Carousel无法正常工作,我也尝试从我用旋转木马创建的另一个网站粘贴字符串,但它不起作用。
<content>
<div id="mycarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#mycarousel" data-slide-to="0" class="active"></li>
<li data-target="#mycarousel" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img src="img/main_photo.jpg" />
</div>
<div class="item">
<img src="img/main_photo2.jpg"/>
</div>
</div> <a class="left carousel-control" href="#mycarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#mycarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</content>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
<script>
$(function (){
$('#mycarousel').carousel({
interval:400
});
})
</script>
</body>
</html>