z-index problem in IE

青春壹個敷衍的年華 提交于 2020-01-21 13:48:25

问题


I have a map with points on it which the user hovers over to reveal further information.

The problem I have is hard to explain because it only seems to be a problem when the user views the page in IE and when it is hosted on my server. Exactly the same code on the jsfiddle page below works fine.

http://jsfiddle.net/FbYEW/

What happens when hosted on my server is the z-indexes on the popups do not work and the popups appear underneath the other spots. Can anyone think why this might be... it's very frustrating not to be able to replicate the problem for anyone to see.

EDIT:

I was viewing the page hosted on my server in compatibility mode on IE8. If you look at the jsfiddle page in IE the same problem occurs - so nothing to do with my server after all... oops


回答1:


When hosted from your server, the page is rendering in a browser mode other than IE9 Standards Mode.

For example, if it's rendering in IE7 Mode or Quirks Mode, z-index problems are expected.

Hit F12 to bring up the Developer Tools, and see which it is.

There are many different possibilities as to why this is happening, see:

http://hsivonen.iki.fi/doctype/#ie8modes

If you just want to fix it without working out where the problem is coming from:

<meta http-equiv="X-UA-Compatible" content="IE=edge">


来源:https://stackoverflow.com/questions/6652697/z-index-problem-in-ie

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