Difference between auto, 0, and no z-index?
问题 What is the difference between: z-index: auto z-index: 0 no z-index at all All the above scenarios are for a div that encloses two div s, div1 and div2 each having a z-index which is 9 and 10 respectively. The enclosing div is in the stacking context of HTML. 回答1: Not specifying z-index is the same as z-index: auto ; that is its initial value. auto and 0 mean the same thing if your element doesn't create its own stacking context; e.g. it is not positioned as relative, absolute or fixed. If