See this comment from jquery-ui
// Ignore z-index if position is set to a value where z-index is ignored by the browser
// This makes behavior of this function consistent across browsers
// WebKit always returns auto if the element is positioned
I see that jquery's zIndex()
returns 0 if the element is position: static
.
Isn't z-index supported on position:static? (It works for me in Chrome, haven't tested cross-browser)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…