Setting transparency causes hierarchy problems?

setting overall transparency for a div opacity causes its level to rise?
phenomenon:
No transparency:

:

excuse me, what is the cause? What is the solution?

Css
Mar.17,2022

set position location and then set z-index property


this is the desired behavior. Setting transparency will form a stack context.. For more information about stack context, please refer to this article https://philipwalton.com/arti.

.
Menu