代码之家  ›  专栏  ›  技术社区  ›  Computer

图片堆叠在顶部,而不是使用猫头鹰传送带滑动

  •  -2
  • Computer  · 技术社区  · 7 年前

    我的网站 http://mytempsite.temporary-domain.com

    上面的页面有两个图片,使用owl carousel显示,但是我无法找出哪里出了问题,因为我使用的是来自web的示例,所以我可能在这里介绍了一些错误。

    我的转盘设置是

    <script>
    
                $(document).ready(function() {
                    $('#banner').owlCarousel({
                        animateOut: 'fadeOut',
                        animateIn: 'fadeIn',
                        items: 1,
                        smartSpeed: 1000,
                        autoplay: true,
                        autoplayTimeout: 6000,
                        dots: true,
                        nav: false,
                        //loop: true,
                        mouseDrag: false,
                        touchDrag: false
                    });
    
                });
            </script>
    

    两个图像会在它们应该滑动时显示出来。我使用的是最新版本的猫头鹰转盘,所以不确定猫头鹰转盘是问题还是其他问题?我检查了我的HTML,它看起来很好,控制台窗口中没有错误(使用chrome)

    我已经剥离了从网站到其基本框架的几乎所有内容,以及当前的javascript、jquery、css保持原样。有什么问题吗?

    1 回复  |  直到 7 年前
        1
  •  3
  •   Peter    7 年前

    我看不到您的源代码中的两个CSS文件,这是OWL Carousel文档所说的成功安装所必需的。( source )您需要在您的 <head> .

    <!-- change paths to reflect your setup -->
    <link rel="stylesheet" href="owlcarousel/owl.carousel.min.css">
    <link rel="stylesheet" href="owlcarousel/owl.theme.default.min.css">