如果基本的bootstrap轮播我成功了:
<div id="carousel-example-generic" class="carousel slide" 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>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="..." alt="...">
<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 id="carousel-example-genericprimary" class="carousel slide" data-ride="carousel">
<!--indicator-->
<!--wrapper slide; #carousel-example-generic1, #carousel-example-generic2, #carousel-example-generic3-->
<!-- Controls with href #carousel-example-genericprimary-->
</div>
任何人都知道bootstrap(3)旋转木马不能正常工作的原因是什么?
答案 0 :(得分:0)
轮播根本不允许嵌套。引导程序4也不是。这就是它的工作方式。但是,如果您需要类似的结构,则始终可以在幻灯片中添加多张卡片。看看W3schools或MDB了解更多