A
A
Alex_L19922019-09-18 13:40:19
css
Alex_L1992, 2019-09-18 13:40:19

How to properly connect Slick Slider to this slider type?

There is such a slider in which there are 3 slides
1st 2nd
5d82061382426091548793.jpeg
3rd
5d8208d53215a521578864.jpeg
I
5d8208de4d5a1496863119.jpeg
don’t understand how to connect it correctly so that everything is displayed correctly, please tell me how to implement it correctly?
Link to codepen

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gh0sty, 2019-09-18
@Alex_L1992

You don't have slick enabled on your codepen.
From experience I can say that slick-slider is a very flexible thing and works exclusively with blocks.
Those. you make up a separate slide as a block and throw it into the slick.
There is no content and img (as far as I know).
Everything should look something like this:

<div class="slider-name" style="width: 100%; height: 800px">
    <!-- cover - растянуть изображение, сохраняя пропорции, но с обрезанием -->
    <div style="width: 100%; height: 100%; background-image: url(path/to/image1.jpg); background-size: cover">
        Данные первого слайда
    </div>
    <div style="width: 100%; height: 100%; background-image: url(path/to/image2.jpg); background-size: cover">
        Данные второго слайда
    </div>
    <div style="width: 100%; height: 100%; background-image: url(path/to/image3.jpg); background-size: cover">
        Данные третьего слайда
    </div>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question