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

290
Views
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
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!