【问题标题】:make slick slider only show 3 item使光滑的滑块只显示 3 项
【发布时间】:2016-03-22 02:23:21
【问题描述】:

你好,我使用光滑的滑块,只想显示 3 张图片

但它在两边留下了一半的图像

<div class="review-company">
    div><img src="http://placehold.it/350x350"></div>
    <div><img src="http://placehold.it/350x350"></div>
    <div><img src="http://placehold.it/350x350"></div>
    <div><img src="http://placehold.it/350x350"></div>
    <div><img src="http://placehold.it/350x350"></div>
    </div><!-- Review-company -->

 $('.review-company').slick({
      centerMode: true,
      centerPadding: '60px',
      slidesToShow: 3,
      responsive: [
        {
          breakpoint: 768,
          settings: {
            arrows: false,
            centerMode: true,
            centerPadding: '40px',
            slidesToShow: 3
          }
        },
        {
          breakpoint: 480,
          settings: {
            arrows: false,
            centerMode: true,
            centerPadding: '40px',
            slidesToShow: 1
          }
        }
      ]
    });

如何让它只显示3个左右空白的图像?

【问题讨论】:

  • 使用centerMode 可以做到这一点。一定要用centerMode吗?
  • 是的,先生,我已经用过了
  • 我在问你是否需要使用centerMode。如果您将其设置为false,您将看不到部分幻灯片。
  • 与您一起修复。谢谢先生啊,我不能放弃我竖起大拇指

标签: jquery html slick.js


【解决方案1】:

只需将 centerMode 设为 false

从@Yass 得到它

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-18
    • 1970-01-01
    • 1970-01-01
    • 2015-11-10
    • 2015-05-13
    • 1970-01-01
    相关资源
    最近更新 更多