嗨,我在我的网站上有这个owl carousel,我的问题是我已经加载了owl carousel js库,它似乎不能工作,不知道问题是什么。下面是我的代码
<!-- PARALLAX -->
<section class="parallax parallax-2" style="background-image: url('<?php echo base_url();?>assets/images/particles_bg.jpg');">
<div class="container">
<div class="owl-carousel text-center owl-testimonial nomargin" data-plugin-options='{"singleItem": true, "autoPlay": 3000, "navigation": false, "pagination": true}'>
<div class="text-center">
<h3 class="nomargin">Popular Products</h3>
<p class="font-lato weight-300 lead nomargin-top">Incidunt deleniti blanditiis quas aperiam recusandae consequatur ullam.</p>
</div>
<div class="text-center">
<h3 class="nomargin">New Products</h3>
<p class="font-lato weight-300 lead nomargin-top">Incidunt deleniti blanditiis quas aperiam recusandae consequatur ullam.</p>
</div>
</div>
</div>
</section>
<!-- /PARALLAX -->图书馆
<link rel="stylesheet" href="<?php echo base_url();?>assets/css/owl.carousel.css">
<link rel="stylesheet" href="<?php echo base_url();?>assets/css/owl.theme.css">
<script type="text/javascript" src="<?php echo base_url();?>assets/js/owl.carousel.min.js"></script>有人能帮我解决这个问题吗?我被困在这上面了。任何帮助都非常感谢。提亚
发布于 2016-03-03 16:55:14
在本例中,您应该在加载所有库时在main.js中调用它,所以如果您还没有创建main.js,请创建它并以适当的方式调用插件(您还应该包含jquery库):$('.owl-carousel').owlCarousel();
http://owlgraphic.com/owlcarousel/#more-demos
owl-carousel官方页面。
https://stackoverflow.com/questions/35767202
复制相似问题