问题描述
我认为这可能是一个简单的问题。但我似乎无法弄清楚这一点。
解释它的最好方法是让您查看
I think this might be a simple issue. but I cant seem to figure this one out.the best way to explain it is for you to see
链接:
如果您注意到主页上的滑块。它可以正常工作,直到到达最后一张幻灯片,然后滑块消失几秒钟,然后重新出现。
if you notice the slider on the homepage. it works fine until it reaches the last slide then the slider disappears for a couple of seconds and then reappears.
我尝试更新引导框架,但仍然无法解决问题。
I tried updating the bootstrap framework but it still doesn't fix the issue.
可能存在问题的任何想法。
any ideas where the problem could be.
源代码:
<div class="carousel slide" id="myCarousel">
<div class="carousel-inner">
<div class="item">
<img alt="" src="...">
</div>
<div class="item">
<img alt="" src="...">
</div>
<div class="item active">
<img alt="" src="...">
</div>
<a data-slide="prev" href="#myCarousel" class="left carousel-control">‹</a>
<a data-slide="next" href="#myCarousel" class="right carousel-control">›</a>
</div>
</div>
推荐答案
问题来自 .carousel-control
不应位于 .carousel-inner
内:轮播尝试将控件显示为项目,从而导致消失。
The problem comes from the .carousel-control
s that should not be inside .carousel-inner
: the carousel is trying to show the controls as items, causing the disappearance.
尝试一下:
<div class="carousel slide" id="myCarousel">
<div class="carousel-inner">
<div class="item">
<img alt="" src="...">
</div>
<div class="item">
<img alt="" src="...">
</div>
<div class="item active">
<img alt="" src="...">
</div>
</div>
<a data-slide="prev" href="#myCarousel" class="left carousel-control">‹</a>
<a data-slide="next" href="#myCarousel" class="right carousel-control">›</a>
</div>
这篇关于twitter引导轮播消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!