You set a z-index
on an element inside a fixed div
that is under the overlay.
In other words, the overlay hiding the z-index
value is 301.
You see, it's like lego blocks. .fixed
is at the bottom with its z-index at 0.
Then on .fixed
your h3
is 300 blocks one over another.
If we add, for example, another div
below the h3
tag with z-index
of 150, the "tower of blocks" would be lower than the h3
so h3
would be on the top.
Then there is another div
(.overlay
) on the same DOM level as .fixed
with a higher z-index
than .fixed
. This block would placed right over the 300 blocks of h3
.
For example:
<==============================> <- the .overlay (z-index 1)
<=>
<=>
<=>
<=>
<=> <=> <- Elements inside .fixed (random z-index)
<=> <=>
<=> <=>
<=> <=>
<=> <=>
<==============================> <- the .fixed (z-index 0)
To set the h3 on top, put it on the same lvl of your overlay or set a higher .fixed
z-index
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…