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

286
Vistas
Why does -webkit-box-reflect disturb the normal behavior of the z-index of the pseudo element ::after?

Without -webkit-box-reflect placed on the container everything works as expected (:: after is behind the container element due to the z-index: -1), but when I add it, something strange starts to happen. The pseudo element is still behind the text, button and input element, but not behind the container ("not behind the background color"). Does anyone know why this is happening? Would help a lot!

Here is the code: https://jsfiddle.net/2ntadghb/10/

HTML:

<div class="container">
   Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor, exercitationem?
   <button>
     click it
   </button>
   <input type="text">
</div>

CSS:

.container {
  width: 200px;
  height: 200px;
  border: 1px solid black;
  background-color: #151515;
  margin: 20px auto;
  position: relative;
  color: white;
  
  -webkit-box-reflect: below;
}

.container::after {
  content: '';
  width: 100px;
  height: 100px;
  display: inline-block;
  background-color: red;
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
}
about 4 years ago · Santiago Trujillo
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