[英]bootstrap carousel controls is not working
I am not expert with bootstrap , but the carousel auto-slide is working well but when clicking on the carousel arrows (right/next-left/prev) these controls not working 我不是bootstrap的专家,但是轮播自动滑动效果很好,但是当点击轮播箭头(右/左上/左下)时,这些控件无法正常工作
how to make it work? 如何使其工作?
the code 编码
header 标头
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="font-awesome-4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="css/glitch.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.theme.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.transitions.css">
<link rel="stylesheet" type="text/css" href="css/sweetalert.css">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/index.css">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/jquery.lettering.js"></script>
<script src="js/jquery.textillate.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.3.3/owl.carousel.min.js"></script>
<script src="js/jquery.transit.min.js"></script>
<script src="js/smoothscroll.js"></script>
<script src="js/sweetalert.min.js"></script>
<script src="js/jquery.vide.js"></script>
<script src="js/index.js"></script>
the carousel 轮播
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img width="960" height="384" src="img/slider1.jpg" alt="slider1">
</div>
<div class="item">
<img width="960" height="384" src="img/slider2.jpg" alt="slider2">
</div>
<div class="item">
<img width="960" height="384" src="img/slider3.jpg" alt="slider3">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
You are missing to include JQuery (needed by bootstrap), add following line in your page HEAD 您缺少要包含的JQuery(引导程序需要),请在页面HEAD中添加以下行
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
Here you can see a working copy of your same code 在这里,您可以看到相同代码的工作副本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.