Animation-fill-mode: forwards causes z-index failure

Mask z-index 1040
pop-up window z-index 1050
-sharpcontent absolute positioning -sharpcontent popup window is a paternity mask and -sharpcontent is a brotherly relationship

-sharpcontent {
    -webkit-animation: fadeIn .4s;
    animation: fadeIn .4s;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    /* -webkit-transition: opacity .4s;
    -o-transition: opacity .4s;
    transition: opacity .4s;
    opacity: 0; */
}

-sharpcontent.fade-in {
    opacity: 1;
}

@-webkit-keyframes fadeIn {
    0% {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
Css
Mar.03,2021

the solution now is to make the pop-up window. Modal container-sharpcontent and mask are sibling nodes, but it is not clear why this problem occurs

.
Menu