【问题标题】:Why Bootstrap's Carousel left arrow throws errors while the right one works fine?为什么 Bootstrap 的 Carousel 左箭头会抛出错误,而右箭头可以正常工作?
【发布时间】:2013-04-19 22:29:42
【问题描述】:

我已经创建了这个页面http://www.virtuemax.com/projects/urtotal/index.html

它是一个静态页面,完全建立在 bootstrap 的框架之上。旋转木马工作正常,但是当您单击左箭头将旋转木马导航到左侧时,它会引发错误。有人可以帮忙吗?

【问题讨论】:

    标签: javascript jquery twitter-bootstrap carousel


    【解决方案1】:

    您的 HTML 编写不正确

    <div class="carousel-inner">
    <img id="floral" src="img/floralOrange.png" alt="">
    
    <div class="item active">
        <img alt="Slide 1" src="img/slide1.jpg">
    </div>
    
    <div class="item">
        <img alt="" src="img/slide2.jpg">
    </div>
    </div>
    

    第一张图片应该像其他图片一样包含在&lt;div class="item"&gt;&lt;/div&gt; 中。 此外,您一次包含 2 个 jquery 插件。删除一个以避免不必要的冲突

    【讨论】:

    • 这是由于将该图像放入类名=carousel-inner 的 div 中。为了设计,我需要那个图像。现在我已经从该 div 中删除了该图像,一切正常。
    猜你喜欢
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-19
    • 2013-10-21
    • 1970-01-01
    相关资源
    最近更新 更多