最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Swiper Slider - Active Slide is not centered - Stack Overflow

programmeradmin1浏览0评论

My active slide with my swiperjs slider is not in the center

I did some custom CSS classes to have images vertically aligned and also to have to in correct sizes on mobile screens.

Any Idea what I am doing wrong?

Here is the link: /

My active slide with my swiperjs slider is not in the center

I did some custom CSS classes to have images vertically aligned and also to have to in correct sizes on mobile screens.

Any Idea what I am doing wrong?

Here is the link: https://markrabadan./personal-work/

Share Improve this question asked Oct 20, 2022 at 8:30 pixelcrashpixelcrash 311 gold badge1 silver badge3 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 2
  1. padding and margin for images messes with sliderjs. Use spaceBetween: 30 option instead.
  2. You can either have clipped images of same size(image-fit:cover) or variable size images(max-width:100%; max-height:100%).

https://codepen.io/saravanapriyanm/pen/mdLZqOJ?editors=1000

发布评论

评论列表(0)

  1. 暂无评论