How i can solve this?
While the slider is initializing the slides have no spaces
and after initialization they appear and the result is an ugly jump
I tried to set additional indents via CSS as a fallback but then somehow the coordinates for the slideNext slidePrev methods are calculated incorrectly
const defaultSettings: SwiperOptions = {
spaceBetween: 16,
slidesPerView: 'auto',
}
How i can solve this?
While the slider is initializing the slides have no spaces
and after initialization they appear and the result is an ugly jump
I tried to set additional indents via CSS as a fallback but then somehow the coordinates for the slideNext slidePrev methods are calculated incorrectly
const defaultSettings: SwiperOptions = {
spaceBetween: 16,
slidesPerView: 'auto',
}
Share
Improve this question
asked Mar 20 at 18:48
DmitriyDmitriy
1077 bronze badges
1 Answer
Reset to default 1Apply gap
to .swiper-wrapper
until .swiper
is initialized:
.swiper {
&:not(.swiper-initialized) {
.swiper-wrapper {
gap: 16px;
}
}
}