IE Z-Index问题 [英] IE Z-Index issues

查看:122
本文介绍了IE Z-Index问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有经典的问题,我的标题导航栏是在我的iframe在身体,但我的尝试解决这与z索引只是让我更困惑,仍然有相同的问题:/
这是我的设置:

I am having the classic problem, my header navigation bar is going under my iframe in the body, but my attempt at solving this with z-indexes has just left me more confused and still with the same problem :/ Here is my setup:

<header style="z-index:2;">
....code....
<nav align="center" style="z-index:2;">
....nav....
</nav>
</header>
<section id="content" style="z-index:-1;">
<div class="block">
    <div class="main">
    <!--[if IE]>
<div style="z-index:-2;">
<iframe width="900" height="900" style="position:relative; z-index:-2;" src="http://www.flytheflagtexas.com/athens/magazine/latest/index.html" ></iframe>
</div>
<![endif]-->
....code....

为什么不z-index: 2 iframe出现在什么东西下?
这是页面: http://www.flytheflagtexas.com/athens/latest可以自由地浏览代码

Why wont the z-index:-2 iframe appear under anything? Here is the page: http://www.flytheflagtexas.com/athens/latest feel free to go through the code

推荐答案

z-index只有在您给出了用于布置组件的位置时才起作用。否则它只是不工作。这意味着z-index适用于:定位的元素

z-index works only if you have given used positions for laying out the components. Otherwise it just doesn't work. This means that z-index Applies to: positioned elements

这篇关于IE Z-Index问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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