旋转木马 - Twitter的引导;隐藏previous或Next按钮 [英] Carousel - Twitter BootStrap ; Hiding the Previous or Next button
本文介绍了旋转木马 - Twitter的引导;隐藏previous或Next按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想实现旋转木马到我的项目。一切工作正常,除了基础的规格上,我要隐藏的previous按钮,如果我在第一张幻灯片...和隐藏下一个按钮,如果我在最后一张幻灯片..
有没有一种方法来处理呢?
I am trying to implement Carousel to my project.. Everything is working fine, except, based on the specs, I HAVE TO HIDE, the previous button, if i am on the first slide... and hide the next button, if i am on the last slide.. Is there a way to handle this?
感谢您
推荐答案
您是否尝试过通过删除旋转木马控制左/右类去除转盘控制。
Have you tried removing the carousel controls via removing "carousel-control left/right" classes.
<a class="carousel-control left" href="#myCarousel" data-slide="prev"> < </a>
<a class="carousel-control right" href="#myCarousel" data-slide="next"> > </a>
- 您可以在没有previous控制启动
- 赶在幻灯片/滑动事件以确定何时第一个图像结束,然后重新添加previous控
- 继续追赶幻灯片/滑动事件,递增沿途的计数器。当你的计数器等于您的图片列表中,您可以删除下一个控
- you can start with no "previous" control
- catch the slide/slid event to determine when the first image has finish, then add back the "previous" control
- continue catching slide/slid event, incrementing a counter along the way. when your counter is equal to your list of images, you can remove the "next" control
这篇关于旋转木马 - Twitter的引导;隐藏previous或Next按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文