IE7绝对元素出现在相对一个元素之后 [英] IE7 Absolute element appearing behind relative one

查看:148
本文介绍了IE7绝对元素出现在相对一个元素之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一个错误,绝对元素出现在相对的上面。

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.

查看

错误报告:Explorer z-index错误

Squish Internet Explorer Z-Index错误

这篇关于IE7绝对元素出现在相对一个元素之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆