为什么用position:static忽略z-index?
// 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吗?(它在Chrome中对我有效,尚未测试跨浏览器)
回答:
由于position: static手段“忽略所有的定位指令left,top,z-index,等”。
'z-index'Value:      auto | <integer> | inherit
Initial:    auto
Applies to:     positioned elements
—
如果元素的“位置”属性具有“静态”以外的值,则称该元素已定位。
以上是 为什么用position:static忽略z-index? 的全部内容, 来源链接: utcz.com/qa/404417.html
