Answers for "setting z index on before after pseudo classes"

0

setting z index on before after pseudo classes

#parent {
    position: relative;
    z-index: 1;
}
#pseudo-parent {
    position: absolute;
    /* no z-index allowed */
}
#pseudo-parent:after {
    position: absolute;
    top:0;
    z-index: -1;
}
Posted by: Guest on May-13-2021

Browse Popular Code Answers by Language