开发者

Specifying CSS stack order without using z-index

I am wondering if either of the following are possible:

  1. Is there a way to use z-index without specifying the position attribute for an element.
  2. Is there any way to specify the CSS stack order for elements witho开发者_JAVA百科ut using either the z-index property or the position attribute


  1. According to w3school z-index can only work on positioned elements.

  2. The only other way is change the order of the elements in the html.


(1) No. see the CSS specs:

For a positioned box, the 'z-index' property specifies:
1. The stack level ...

Each positioned box in a given stacking context has an integer stack level.

(2) No. the CSS stack order is the z-index

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜