gpt4 book ai didi

jquery - 旋转木马不滑动

转载 作者:行者123 更新时间:2023-11-28 13:12:19 24 4
gpt4 key购买 nike

我的轮播有问题。它不会滑动。我试了这么多,头都疼了。问题是它只停留在一张照片上,箭头不起作用。

包括文件:

<head> 
<!--- START Styles --->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="http://localhost/mywebside/css/bootstrap.css" type="text/css"/>
<link rel="stylesheet" href="http://localhost/mywebside/index.css" type="text/css" />
<!--- END Styles --->
<!--- START Scripts --->
<script type="text/javascript" src"http://localhost/mywebside/js/bootstrap.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src"http://localhost/mywebside/js/carousel.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.carousel').carousel()
})
</script>
<!--- END Scripts --->
</head>

HTML:

 <div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item"> <img src="img/Wood.png"></div>
<div class="item"> <img src="img/Stone.png"></div>
<div class="item"> <img src="img/dirt.png"></div>
</div>
<a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
</div>

最佳答案

更改您的脚本顺序并尝试

<script type="text/javascript" src"http://localhost/mywebside/js/bootstrap.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src"http://localhost/mywebside/js/carousel.js"></script>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src"http://localhost/mywebside/js/bootstrap.js"></script>
<script type="text/javascript" src"http://localhost/mywebside/js/carousel.js"></script>

第二次尝试

添加

<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">

它在这个 JSFIDDLE DEMO 中工作

关于jquery - 旋转木马不滑动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18662909/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com