问题
I have multiple divs in my webpage. there is this javascript slide show and i have put a menu over that slideshow and positioned the div absolute. I have formatted the order with z-indexes. They work perfect in firefox but Internet Explorer does not work on that. what can be the solution.
Thanks in advance.
回答1:
If you have a full page wrapper div anywhere or can make one or there is an ancestor/parent div you can freely alter,...
Explicitly state position: relative;
or position: absolute;
and either way also set z-index: 0;
or the lowest value you can use.
Also some browsers (especially some IEs) allow a smaller range of z-index.
For sure values between 1 and 100 are safe. Probably more like 1-255 but I vaguely recall some old issue,...
来源:https://stackoverflow.com/questions/5087553/z-index-does-not-work-in-ie