Nivo 滑块奇怪的行为:最后一张图像后空白幻灯片

发布于 2024-12-25 07:26:41 字数 2206 浏览 8 评论 0原文

我正在测试 Nivo,我遇到了这种奇怪的行为,即在最后一张图像之后出现一张空白幻灯片,就像一张空白图像,一段时间后又重新开始(正常)。最后一张幻灯片之后并不总是随机的。 我正在使用 Twitter Bootstrap 和 jQuery 1.7.1,代码是:

                <div class="slider-wrapper theme-default"><div class="ribbon"></div>
                    <div id="nivoslider" class="nivoSlider" style="width:743px;height:295px;overflow: hidden">

                        <a href="#"><img src="images/nivo/banner740-optz.png" title="#teste1" alt="" /></a>
                        <a href="#"><img src="images/nivo/nemo.jpg" title="#teste2" alt="" /></a>
                        <a href="#"><img src="images/nivo/toystory.jpg" title="#teste3" alt="" /></a>
                        <a href="#"><img src="images/nivo/walle.jpg" title="#teste4" alt="" /></a>
                        <a href="#"><img src="images/nivo/up.jpg" title="#teste5" alt="" /></a>

                        <div id="teste1" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste2" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste3" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste4" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste5" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>

                    </div>

                </div>

I was testing Nivo and I am getting this strange behavior that appears a blank slide after the last image, like a blank image, for a while and than starts again (normal). It's not random always after the last slide.
I'm using Twitter Bootstrap and jQuery 1.7.1 and the code is:

                <div class="slider-wrapper theme-default"><div class="ribbon"></div>
                    <div id="nivoslider" class="nivoSlider" style="width:743px;height:295px;overflow: hidden">

                        <a href="#"><img src="images/nivo/banner740-optz.png" title="#teste1" alt="" /></a>
                        <a href="#"><img src="images/nivo/nemo.jpg" title="#teste2" alt="" /></a>
                        <a href="#"><img src="images/nivo/toystory.jpg" title="#teste3" alt="" /></a>
                        <a href="#"><img src="images/nivo/walle.jpg" title="#teste4" alt="" /></a>
                        <a href="#"><img src="images/nivo/up.jpg" title="#teste5" alt="" /></a>

                        <div id="teste1" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste2" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste3" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste4" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>
                        <div id="teste5" class="nivo-html-caption">
                            <h4>Some Title</h4>
                            <p>Some paragraph</p>
                        </div>

                    </div>

                </div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

感性不性感 2025-01-01 07:26:41

好的 - 在我看来,所有标题都应该位于 #nivoSlider div 之外。我在 http://jsfiddle.net/bv4yX/10/ 的示例中将它们向下移动了现在似乎工作正常。

OK - looks to me like all the captions should be OUTSIDE the #nivoSlider div. I moved them down in my example at http://jsfiddle.net/bv4yX/10/ and it seems to work fine now.

雾里花 2025-01-01 07:26:41

我的 nivoslider 也有引导程序的错误。我的解决方案:
nivoslider.css.nivoSlider img 中:

.nivoSlider img {
    position:absolute;
    top:0px;
    left:0px;
    /*bug fix bellow*/
    vertical-align: baseline !important;
    max-width: none !important;
}

My nivoslider also had bugs with bootstrap. My solution:
In nivoslider.css, .nivoSlider img:

.nivoSlider img {
    position:absolute;
    top:0px;
    left:0px;
    /*bug fix bellow*/
    vertical-align: baseline !important;
    max-width: none !important;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文