M
M
Mikle8882019-10-12 16:34:57
css
Mikle888, 2019-10-12 16:34:57

Why does slick-slider set unrealistic slide widths?

Tried to make a simple slider using slick.
initialize
$(".slider-big").slick({});

<div class="slider-big">
  <div class="slider-big__slide">Hello</div>
  <div class="slider-big__slide">Hello</div>
  <div class="slider-big__slide">Hello</div>
  <div class="slider-big__slide">Hello</div>
  <div class="slider-big__slide">Hello</div>
</div>

It would seem that everything should work fine, but slick gives simply unrealistic width values:
5da1d69c83b51748261295.png
5da1d660d3844055465065.png
After clicking forward / backward, everything only gets worse, the values ​​​​increase
What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Shepelev, 2019-10-12
@bshepelev

What is your problem? The area width is all horizontal blocks + loading blocks. Everything is very intelligibly written https://kenwheeler.github.io/slick/

P
Pit, 2019-11-12
@pit6262

If you have a slider in a flex block, then this can manifest itself, I need to look at the code with the problem, preferably give a link or throw the code somewhere in the online editor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question