在OWL轮播中滑动2个项目 [英] Slide 2 items in OWL Carousel

查看:95
本文介绍了在OWL轮播中滑动2个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 OWL传送带用于我的滑块.

我想做的是单击下一个上一个幻灯片2.

What I am trying to do is slide 2 items when next previous is clicked.

因此,它滑动到第二个项目时,在传输过程中仍显示第二个项目.

So its sliding to every second item still showing the second item during the transmission.

我试图用CSS解决这个问题,但没有成功.

I have tried to work it out with CSS but no success.

这是我的基本设置

$("#owl-demo").owlCarousel({

  navigation : true, // Show next and prev buttons
  slideSpeed : 600,
  paginationSpeed : 400,
  singleItem:true,

  // "singleItem:true" is a shortcut for:
  // items : 2 
  // itemsDesktop : false,
  // itemsDesktopSmall : false,
  // itemsTablet: false,
  // itemsMobile : false

});

非常感谢您的帮助.

谢谢.

推荐答案

在当前版本的Owl Carousel(1.3.2)中,找到"owl.carousel.js"文件并滚动到#558行.该行将显示为:

In the current version of Owl Carousel (1.3.2), find the "owl.carousel.js" file and scroll to line #558. The line will read:

base.currentItem += base.options.scrollPerPage === true ? base.options.items : 1;

将最后一个数字更改为"2",使其显示为:

Change the last number to "2" so that it reads:

base.currentItem += base.options.scrollPerPage === true ? base.options.items : 2;

保存文件,这将使滑块移动两个项目.

Save the file, and that should make the slider move by two items.

这篇关于在OWL轮播中滑动2个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆