Why does my ::before
pseudo-element not sit behind it's parent? I am creating a new stacking context and adding a z-index
of -1.
.panda {
position: relative;
border: 1.5vmin solid black;
width: 45vmin;
height: 45vmin;
border-radius: 50%;
background: #fff;
z-index: 2;
&:before {
content: '';
position: absolute;
z-index: -1;
width: 15vmin;
height: 15vmin;
background: black;
border-radius: 50%;
top: -4vmin;
left: -2.1vmin;
box-shadow: 30vmin 0 #000;
}
}