gpt4 book ai didi

javascript - Twitter Bootstrap 轮播不旋转图像

转载 作者:行者123 更新时间:2023-11-28 01:23:43 24 4
gpt4 key购买 nike

正在显示事件图像,但此后没有任何反应。我是 Bootstrapper 的新手,所以我希望有人能让我知道我是否缺少库或语法错误。我环顾四周,似乎一切都正常?

        <head>
<meta charset="utf-8">
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="css/bootstrap-responsive.css">

<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

</head>
<body>
<div class="container">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-th-list"></span></a>
<a href="#" class="brand">California Autism Center & Learning Group</a>
<div class="nav-collapse collapse">
<ul class="nav pull-right">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Our Staff</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="hero-unit">
<div id="myCarousel" class="carousel slide">
<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>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item" alt=""><img src="img/Banner.jpg"/></div>
<div class="item" alt=""><img src="img/autism1.jpg"/></div>
<div class="item" alt=""><img src="img/autism2.jpg"/></div>
</div>
<!-- Carousel nav -->
<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>
</div>
<div class="row-fluid">
<div class="span8">
<h3>How We Started</h3>
<p>Add information here.</p>
<h3>Our Goals</h3>
<p>Add nformation here.</p>
</div>
</div>
<hr>
<div class="container">
<div class="row-fluid">
<div class="span4">
<p>&copy; 2013 <a href="#"></a></p>
</div>
<div class="span4 text-center">
<ul class="nav inline">
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Privacy Policy</a></li>
</ul>
</div>
<div class="span4 text-right">
<p></p>
</div>
</div>
</div>

</div>


<script src="//code.jquery.com/jquery-1.10.0.min.js"></script>
<script src=”js/bootstrap.js”></script>
</body>
</html>

my .js code:

$(document).ready(function() {
$('#myCarousel').carousel({
interval: 2000
})

});

最佳答案

在结束正文标记之前尝试此操作。当我在 BS2 和 3 上使用时它有效。

<script>
$('.carousel').carousel({
pause:false,
interval:7000
})
</script>

关于javascript - Twitter Bootstrap 轮播不旋转图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22976780/

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