IE7下拉菜单出现在图像后面 [英] IE7 dropdown menu appears behind image
问题描述
我已经创建了这个css3下拉菜单,出现在图像的后面,当我将鼠标放在下拉菜单上,我试图找出来。但不能为我的生活。任何帮助是非常赞成你可以看看它在这里。
I have created this css3 dropdown menu that appears behind the image when I mouse over the dropdown menu, and I have tried to figure it out. But cant for the life of me. Any help is greatly appeciated you can take a look at it here.
推荐答案
引用此线程
Z-index不是绝对测量。 z-index:1000的元素可以位于z-index:1的元素之后 - 只要相应的元素属于不同的堆栈上下文即可。
Z-index is not an absolute measurement. It is possible for an element with z-index: 1000 to be behind an element with z-index: 1 - as long as the respective elements belong to different stacking contexts.
当您指定z-index时,您将在相同的堆叠上下文中指定它相对于其他元素,虽然CSS规范的Z-index段落表示新的堆栈上下文仅为z-index为其他比起auto(意味着你的整个文档应该是一个单一的堆叠上下文),你做了一个定位跨度:显然IE解释这是一个新的堆叠上下文。
When you specify z-index, you're specifying it relative to other elements in the same stacking context, and although the CSS spec's paragraph on Z-index says a new stacking context is only created for positioned content with a z-index other than auto (meaning your entire document should be a single stacking context), you did construct a positioned span: apparently IE interprets this as a new stacking context.
UPDATE - -
UPDATE-
将以下css添加到您的页面
Add the following css to you page
#header
{
position:relative;
z-index: 2;
}
#content-wrap
{
position:relative;
}
这篇关于IE7下拉菜单出现在图像后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!