Does negative z-index have any side effects

匆匆过客 提交于 2019-12-22 03:55:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!