IE7绝对元素出现在相对一个元素之后 [英] IE7 Absolute element appearing behind relative one
问题描述
我知道有一个错误,绝对元素出现在相对的上面。
I know there is the bug where absolute elements appear above relative ones. However I am getting the reverse of this issue.
bottom元素的z-index是1,并且有一个position:relative。顶部元素具有绝对定位和z索引为99.
The z-index on the "bottom" element is 1 and has a position:relative assigned. The top element has absolute positioning and a z-index of 99.
这在Firefox,基于Webkit的浏览器和IE8中工作正常。有关为什么会发生这种情况的任何想法?
This works fine in Firefox, Webkit based browsers and IE8. Any ideas about why this could be happening?
推荐答案
生成一个新的堆叠
上下文,从z-index值
为0开始。因此z-index不能正确工作
。
In Internet Explorer positioned elements generate a new stacking context, starting with a z-index value of 0. Therefore z-index doesn't work correctly.
查看
和
Squish Internet Explorer Z-Index错误
这篇关于IE7绝对元素出现在相对一个元素之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!