使用slick.js显示滑块时出现错误,该滑块在滑块的开头和结尾又添加了两个幻灯片。我想使滑块显示正常。这是我的设定。是否有解决此问题的建议。预先谢谢你。
我使用nodejs和ejs运行此代码。
在home.ejs页面
<div id="carousel-list">
<div>
<section class="col-xs-6 col-lg-4">
<ul class="list-item">
<img src="img/list_img.jpg" alt="list_img">
<div class="over-play"></div>
<a href="#" target="_self" title="Victoria Village"> <i class="fa fa-caret-right" aria-hidden="true"></i></a>
</ul>
</section>
</div>
<div>
<section class="col-xs-6 col-lg-4">
<ul class="list-item">
<img src="img/list_img.jpg" alt="list_img">
<div class="over-play"></div>
<a href="#" target="_self" title="Victoria Village"> <i class="fa fa-caret-right" aria-hidden="true"></i></a>
</ul>
</section>
</div>
<div>
<section class="col-xs-6 col-lg-4">
<ul class="list-item">
<img src="img/list_img.jpg" alt="list_img">
<div class="over-play"></div>
<a href="#" target="_self" title="Victoria Village"> <i class="fa fa-caret-right" aria-hidden="true"></i></a>
</ul>
</section>
</div>
</div>
在script.js页面中
$("#carousel-list").slick({
dots: true,
slidesToShow: 3,
slidesToScroll: 1,
});
问题,它会在滑块的开头自动添加标签 Here is an image show result and what slick.js generate