看到这个评论from jquery-ui为什么z-index忽略位置:static?
// 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
我看到jQuery的zIndex()
返回0,如果该元素是position: static
。
z-index是否支持position:static? (它为我在Chrome中,还没有测试跨浏览器)
可能重复http://stackoverflow.com/questions/7814282/why-is-my-z-index-being-ignored – Dve
@Dve - 不是真的。这个问题的答案是“它不适用于静态位置的元素。”我问**为什么**。 – ripper234