-
I'm trying to make stackFlow's card wider, currently, compare to normal node swiper, their image is way more narrow, I can see their I tried to assign the width of images directly, this makes images goes to the right side... const stackFlow = {
setTranslate(this: Swiper & IStackFlow) {
const {
width: swiperWidth,
height: swiperHeight,
slides,
slidesSizesGrid,
activeIndex,
} = this;
for (let i = 0, length = slides.length; i < length; i += 1) {
const $slideEl = slides.eq(i);
$slideEl[0].style.width = `${swiperWidth * 0.8}px`; This is kind of similar to #4644 , I hope images can go left. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Seems width is controlled by And in stack mode, we get width=swiperContainerWidth/5 , so they are small, and we stack them together, so there will be large amount of padding. So we have to use |
Beta Was this translation helpful? Give feedback.
Seems width is controlled by
swiper/src/components/core/update/updateSlides.js
Line 184 in 76dd086
And in stack mode, we get width=swiperContainerWidth/5 , so they are small, and we stack them together, so there will be large amount of padding.
So we have to use
slidesPerView: 'auto'
, then we can control width by css.