question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Display one item and half of the prev/next ones

See original GitHub issue

Hi,

http://jsfiddle.net/lbineau/vdnphxpg/

I would like to create this effect but I can’t find any example : slick I tried to do it with transform but at some point there are problems with cloned items (and absolutly not with dragging).

$('.slick').slick({
  centerMode: true,
  centerPadding: '0',
  slidesToShow: 3
});
.slick-slide{
  outline: 0;
  width: 168px;
  height: 309px;
  transition: transform 0.5s;
  &.slick-current.slick-active{
    transform: none;
  }
  &.slick-active{
    transform: translateX(-50%);
  }
  &.slick-current + .slick-active{
    transform: translateX(50%);
  }
}

Any idea ?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sunil25393commented, May 4, 2021

this worked for me

.slick-list .slick-track{ padding-left: 12.5%; }

formula is this:

padding left = (100%/ no of slide to show)/2;

if no of the slide to show is 2, padding-left will be 25% keep a number of slides to show in even number.

0reactions
leonace924commented, Jul 25, 2020

Hello, @leggomuhgreggo , how are you?

Do you have a clear solution for this one? Since I am using slick-carousel in react, I need this for sure Hope to get help from you Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trainers Test Flashcards - Quizlet
Study with Quizlet and memorize flashcards containing terms like Which of the following statements can correctly be made about preparing boards equipment ...
Read more >
Amazing CSS Slideshow Examples You Can Use In Your ...
Choose from one of these fantastic CSS slideshows to highlight your products and services. Responsive and Eye-Catching Slideshows. Coffee Shop ...
Read more >
Shakespeare's Theater
This online resource of items from the Folger and other institutions brings together all known manuscript and print references to Shakespeare and his...
Read more >
Functions (II) - CPlusPlus.com
The first thing that should call your attention is that in the declaration of duplicate the type of each parameter was followed by...
Read more >
T-JTA
Like an emotional x-ray, the T-JTA Profile displays in graphical terms the landscape of one's temperament. Its visual presentation is immediately accessible ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found