你们都在失去理智.我在这个网站上花了好几天,其他人尝试了不同的代码片段.
当我在jsfiddle预览时,一切都很好.但在我的网站上,它不会自动播放,我也无法点击导航按钮.救命!
现场网站:www.zjscreations.com
<section> <script> $(function() { $('#myCarousel').carousel({ interval: 2000 }); }); </script> <div id="myCarousel" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <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> <li data-target="#myCarousel" data-slide-to="3"></li> </ol> <!-- Wrapper for slides --> <div class="carousel-inner" role="listBox"> <div class="item active"> <img src="images/Hanna Edens Headshot - Alki Beach.jpg" alt="Hanna Edens Heashot - Alki Beach" class="img-responsive"> </div> <div class="item"> <img src="images/Stella Salsbury - Dog Portrait.jpg" alt="Stella Salsbury - Dog Portrait" class="img-responsive"> </div> <div class="item"> <img src="/images/Hanna Edens Headshot - Seattle Skyline.jpg" alt="Hanna Edens Heashot - Seattle Skyline" class="img-responsive"> </div> </div> <!-- Left and right controls --> <a class="carousel-control left" href="#my_carousel" data-slide = "prev"> <span class="icon-prev left"></span> </a> <a class="carousel-control right" href="#my_carousel" data-slide = "next"> <span class="icon-next right"></span> </a> </div> </section>
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。