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

898
Vistas
css :first-visible-child & :last-visible-child

i'm making a container with children. I need the first visible child & last visible child have rounded corners.

My approach is using :first-child & :last-child and it works fine. But if one/some children have .hidden, the layout seem broken. So I need a something similar to :first-visible-child & :last-visible-child, of course that selector doesn't exist. I need a trick/hack to archive the similar result.

Note: I cannot apply border-radius on the container with overflow: hidden because the child's box-shadow will be clipped out and the children might have a shake transfom effect and I don't want become clipped out.

Note: a javascript solution are welcome. Maybe using VisibilityObserver() 🤣

Here the illustration: enter image description here

about 4 years ago · Juan Pablo Isaza
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