gpt4 book ai didi

css - Bootstrap 3 旋转木马导航器事件类未更新

转载 作者:太空宇宙 更新时间:2023-11-04 12:03:51 25 4
gpt4 key购买 nike

导航器可以毫无问题地导航幻灯片,除了事件类保留在第一个导航器上。

这是我的代码:

<div id="homepanel" class="carousel slide" data-ride="carousel" data-interval="5000">
<!-- Indicators -->
<div class="row">
<div class="col-sm-4">
<ol class="home-tabs">
<li>Featured Products</li>
<li data-target="#homepanel" data-slide-to="0" class="active"><a href="#">Slide 1</a></li>
<li data-target="#homepanel" data-slide-to="1"><a href="#">Slide 2</a></li>

</ol>
</div>

<div class="col-sm-8">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<div class="row">
<div class="col-sm-6">
<img alt="Cardboard Boxes" src="/slide1.png" class="no-border-radius">
</div>
<div class="col-sm-6">
<div class="content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sequi, sint.</p>
</div>
</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-sm-6">
<img alt="Multi-wall Sacks" src="/slide2.jpg" class="no-border-radius">
</div>
<div class="col-sm-6">
<div class="content">
<p>Molestiae incidunt excepturi dolorum autem eum illum ipsa facilis sed.</p>
</div>

</div>
</div>
</div>

</div>
</div>
</div>
</div>

li.active 根本没有改变。我的代码中是否缺少任何内容?有什么想法吗?

我在这里附上了一个 jsfiddle 链接:http://jsfiddle.net/wpyz4c22/

最佳答案

Carousel 需要一个额外的指示器类来改变 li 事件状态。你缺少那个类:.carousel-indicators

在这里找到 JSFiddle:http://jsfiddle.net/Bladepianist/tzrnjdkk/

<div id="homepanel" class="carousel slide" data-ride="carousel" data-interval="5000">
<!-- Indicators -->
<div class="row">
<div class="col-sm-4">
<ol class="home-tabs carousel-indicators">

<li data-target="#homepanel" data-slide-to="0" class="active"><a href="#">Slide 1</a></li>
<li data-target="#homepanel" data-slide-to="1"><a href="#">Slide 2</a></li>

</ol>
</div>

<div class="col-sm-8">
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<div class="row">
<div class="col-sm-6">
<img alt="Cardboard Boxes" src="http://placehold.it/310x200" class="no-border-radius">
</div>
<div class="col-sm-6">

</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-sm-6">
<img alt="Multi-wall Sacks" src="http://placehold.it/310x200" class="no-border-radius">
</div>
<div class="col-sm-6">


</div>
</div>
</div>

</div>
</div>
</div>
</div>

关于css - Bootstrap 3 旋转木马导航器事件类未更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29525991/

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