1

我正在使用那里网站的引导演示。

但是当我在标记的情况下使用它时,首先会出现一张空白幻灯片。标记取自我的来源,我找不到任何问题。我把源放在小提琴里,同样的事情发生了。

为什么会发生这种情况,为什么我的标记与演示相同。

请看这个小提琴来体验这个问题。http://jsfiddle.net/aVBUy/3/

这是我的标记...

<div id="myCarousel" class="carousel slide">

    <div class="carousel-inner">

        <div class="item" style="background-image: url('riders-carousel-011.jpg');">
            <img src="wp/wp-content/themes/riders-experience/images/x.gif" alt="" />
            <div class="container">
                <div class="carousel-caption">
                    <h1>Riders for Health</h1>
                    <p class="lead">Riders Experience Africa is more than just a holiday&#8230;
It is a unique chance to see the work of Riders for Health and to learn about how motorcycles are helping&hellip;</p>
                    <a class="btn btn-large btn" href="riders-for-health/">Veiw more information</a>
                </div>
            </div>
        </div>

        <div class="item" style="background-image: url('riders-carousel-02.jpg');">
            <img src="wp/wp-content/themes/riders-experience/images/x.gif" alt="" />
            <div class="container">
                <div class="carousel-caption">
                    <h1>Rider Check List</h1>
                    <p class="lead">Motorcycle helmet Full face or open face. A motocross or enduro style helmet is a better choice. These are specifically designed for off-road use and have particular&hellip;</p>
                    <a class="btn btn-large btn" href="rider-check-list/">Veiw more information</a>
                </div>
            </div>
        </div>

    </div>

    <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
    <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>

</div>

帮助会很棒,因为我有点生气。我已经完全按照演示显示(我希望)

谢谢

4

1 回答 1

1

我认为你必须先$('..').carousel()在 jquery 中初始化它,或者只是将类“活动”添加到第一项..

更新小提琴:http: //jsfiddle.net/skelly/aVBUy/5/

于 2013-05-08T18:05:00.187 回答