Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

344
Views
¿Cómo puedo cambiar el ancho de las diapositivas en swiperjs usando slidesPerview?

Estoy tratando de hacer que mi swiper se vea así, con la diapositiva activa centrada y la diapositiva anterior y la siguiente mostrando un poco al costado.

ingrese la descripción de la imagen aquí

Sin embargo, no sé cómo puedo cambiar el ancho de las diapositivas y mantenerlas centradas.

https://codesandbox.io/s/empty-wind-yxj67v?file=/index.html

 .box { max-width: 1440px; display: flex; height: 500px; margin: 0 auto; overflow: hidden; } .box .banner-swiper { width: 100%; height: 100%; display: flex; position: relative; } .box .swiper-wrapper { display: flex; flex-direction: row; flex-wrap: nowrap; } .box .swiper-wrapper .prev-slide, .box .swiper-wrapper .next-slide { opacity: 0.4; } .box .swiper-slide { display: flex; justify-content: center; align-items: center; } .box .swiper-slide { width: 1000px; } .box .swiper-slide img { display: block; width: 100%; height: 100%; object-fit: cover; } .box .navigation { display: block; position: absolute; width: 120px; height: 56px; z-index: 50; bottom: 16px; right: 236px; } .box .navigation .previous { margin-right: 8px; } .box .navigation .previous, .box .navigation .next { width: 56px; height: 56px; background-color: #424142; } .box .navigation .previous i, .box .navigation .next i { color: white; }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Después de inspeccionar, un estilo en línea sobrescribe su .box .swiper-slide {width} . Si desea que la diapositiva sea explícitamente de 1000 px, use !important .

Sugeriría al menos usar un enfoque más receptivo. Si el control deslizante se extenderá por la pantalla, considere usar 75vw como medida.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!