Changing opacity or a transform creates a new stacking context.  https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context   It's due to how browsers render opacity and transforms. I tried to explain to what's going on here. The question was about z-index, but it's the same issue.    
    • Thanks
    • Like
    3