Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
Enlarge the first slide of a carousel

I tried to create a carousel as follows. But I couldn't make it work. I also tried to use Center Mode in the slick carousel. But it only applies to the slide in the middle. If there is a method or library that can enlarge the first slide in this way, please indicate. thank you. The carousel i want

about 4 years ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

You can maybe look into adding an "active" class to an element of the slide - so then you can apply appropriate CSS to the active class and it will only affect the active element. This means that one of the images will be "active" and you can do whatever to it, and when it slides another will become "active" and inherit the properties, whilst the one from before will lose them.

https://www.w3schools.com/howto/howto_js_active_element.asp

about 4 years ago · Juan Pablo Isaza Denunciar

0

Independed of your actual slide usecase you can target the first element among a group of siblings with the css :first-child pseudo class (see https://developer.mozilla.org/en-US/docs/Web/CSS/:first-child).

Ive added a simple example of how to use it.

To transfer it to your swiper you will have to apply the :first-child pseudo class to the class wrapping your individual slides.

.wrapper {
  display: flex;
}

.entry {
  font-size: 15px;
}

.entry:first-child {
  font-size: 20px;
}
<div class="wrapper">
  <div class="entry">Entry</div>
  <div class="entry">Entry</div>
  <div class="entry">Entry</div>
  <div class="entry">Entry</div>
</div>

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can achieve this design through these codes:

for the first image

 .slick-slide.slick-current.slick-active {        
   .your class {
        width: 100%;   
    }
 }

for the following images

.slick-slide.slick-active {  
  .your class {
        width: 80%;   
    }
 }
 

you can add first-child if you like to design specific class

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda