Hey,
I’m trying to implement this. I have the box div, and box:after pseudo element. I want the pseudo element to be on thop of the box div.
Why does not this work?
#box {
background: pink;
width: 200px;
height: 200px;
position: relative;
display: block;
}
#box:after {
background-color: red;
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
display: block;
transform: translate(5px, 5px);
}
On codepen:
http://codepen.io/RycerzPegaza/pen/jyRRBE