简体   繁体   中英

How to combine tabs and carousel in Twitter Bootstrap

I'm trying to implement Twitter Bootstrap Carousel and Tabs. They both look to be functioning alright on the initial load, but as soon I hit one of the carousel arrows, the content goes away (the active class is removed and display is set to none). Can anybody see what the problem could be? sample page (look at the news box at the bottom right of the screen)

Control links refers to #news-box :

<!-- Carousel nav -->
<a class="carousel-control left" href="#news-box" data-slide="prev">‹</a>
<a class="carousel-control pause-play pause" href="#news-box"></a>
<a class="carousel-control right" href="#news-box" data-slide="next">›</a>

But your carousel has no id :

<div class="carousel slide">

Try with:

<div class="carousel slide" id="news-box">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM