How do I use the z-index properly?

后端 未结 2 956
一向
一向 2020-11-30 15:31

See this page here:

http://www.blakearchive.org/blake/public/exhibits/canterburySpecial.html

The menu bar is supposed to go above the text and the red and b

2条回答
  •  感情败类
    2020-11-30 16:25

    The z-index property will only work when there is also a position property applied (not counting position: static;, which is the default).

    All of the following will work, according to the spec:

    position: fixed;
    position: absolute;
    position: relative;
    position: sticky; /* Limited support, currently in Firefox and Opera */
    

    The only exceptions are within a flex container or a CSS grid.

提交回复
热议问题