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

961
Vistas
How to put images on top of each other in react.js dynamically?

tomato card, which when clicked the no. of  elements should increase

This screenshot shows how I want the  elements to stack on top each other, so it looks like baskets are kept on each other

This screenshot shows what I am able to achieve. I have achieved this using "display:flex; flex-direction:column-reverse;". So the first  element goes to the bottom, 2nd  element is placed above the bottom and so on.

Now, I want to achieve this dynamically, when I click on the tomato card, the number below it increases,so that the basket images are put on each other as in image 2. I know how z-index works, but I don't know how should I use it to position these images as in image 2.

The image 3 shows what I am able to achieve using "display:flex; flex-direction:column-reverse;", so the first element is at the bottom, the 2nd element goes above the bottom and so on.

Thanks in advance.

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

0

One approach would be to use negative values to the margins between those images.

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