Slick Slider "eats" a built-in slide styles. What to do?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
79 views
The problem in adapting of slider to mobile devices. The fact that the slide background-img is set to an inline style.

Respectively added in JS the necessary breakpoints for resizing the slider. So, inline styles, that is, the background picture disappears after rebuilding the slider. What I do not understand. I would appreciate the help. Thank you.

Distribute an example! https://codepen.io/Nadinsan/pen/zjoJBB
by | 79 views

1 Answer

0 like 0 dislike
2 simple solutions:
1) Assign each slide a unique class (e.g., slide-1, slide-2, etc.) that will be transmitted picture. If all the image's url is known in advance, it is possible to send the file with styles. If not, then add to the page in .
2) Add in each .slide the nested div, which assign a background-image.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users