Slick carousel loads the wrong width on initialization
Asked Answered
C

1

7

On page load, for the first second of so, the first slide only takes up half of the screen before correcting itself. It is causing an unpleasant/snappy load experience. If I monitor the elements code via inspect I can see the inline width get updated about a second into page load. Any suggestions?

Chamfron answered 29/4, 2016 at 17:38 Comment(2)
Did you find a workaround ?Suprarenal
it helps if you give it some default css for it to show the intended view until slick loads and takes over the design. Also, it helps to giving max-height and overflow hidden to the container to avoid overflowing content in the first few secondsArchegonium
O
0

i have same problem solution is start from prev slide (initialSlide: ...) and call slick('slickNext')

Ossify answered 9/10, 2019 at 6:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.