gpt4 book ai didi

twitter-bootstrap-3 - Bootstrap Carousel 幻灯片放映不会滚动超过三张幻灯片

转载 作者:行者123 更新时间:2023-12-04 08:05:04 24 4
gpt4 key购买 nike

我无法让我的幻灯片自动滚动浏览我的所有图片。它滚动了三张图片,但我有六张。当我单击箭头时,它会滚动浏览所有图片,但不会自动滚动浏览所有图片。它在网站未上线时工作,但在 Chrome 上线时不起作用。这是我的代码..


    <div id="carousel-example-generic" class="carousel-inner" 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>

<div class="carousel-inner">

<div class="item active">
<img src="img/landscape.jpg" alt="landscape design and installation">
<div class="carousel-caption"></div>
</div>

<div class="item">
<img src="img/patio.jpg" alt="stonework">
<div class="carousel-caption"></div>
</div>

<div class="item">
<img src="img/patio2.jpg" alt="full-service">
<div class="carousel-caption"></div>
</div>

<div class="item">
<img src="img/firepit.png" alt="Fire Pit">
<div class="carousel-caption"></div>
</div>

<div class="item">
<img src="img/deck.png" alt="deck">
<div class="carousel-caption"></div>
</div>

<div class="item">
<img src="img/gardens.png" alt="deck">
<div class="carousel-caption"></div>
</div>

</div>

<!-- Controls -->

<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span></a>

<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span></a>
</div>
</div>

最佳答案

您需要添加更多数据目标:

<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
<li data-target="#carousel-example-generic" data-slide-to="5"></li>

由于您有 6 张幻灯片,因此您需要有 6 个数据目标(从 0 开始)

关于twitter-bootstrap-3 - Bootstrap Carousel 幻灯片放映不会滚动超过三张幻灯片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22311311/

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