问题
I've been searching for a while for an answer to my question:
Does negative z-index have any side effects
And I've already asked before here: Does negative z-index affect performance or compatibility? but it doesn't get enough attention (may be because I mixed things a little bit)
And I wanted to try and asked in a other way.
I am developing a web application for cross platforms (different browsers, devices), and sometimes I am in need to use a negative value for the z-index property, but I'm afraid if it can have any side effects on any/some browser and break the compatibility.
I hope I made the question clear :)
回答1:
Negative values are fine after Chrome 1.0, FireFox 3.0, IE 4.0, Opera 4.0, Safari 1.0. So basically if you don't live in 2000 you should be fine using negative z-indices. MDN doesn't seem to have any data for mobile devices though, but I would imagine since it's in the spec that most mobile browsers will also be fine.
Browser support of negative z-index values (CSS 2.1) according to the MDN
来源:https://stackoverflow.com/questions/19830806/does-negative-z-index-have-any-side-effects