我遇到了经典问题,我的标题导航栏位于正文中的 iframe 下方,但我尝试使用 z 索引解决此问题让我更加困惑,并且仍然遇到同样的问题:/ 这是我的设置:
<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请随意浏览代码
最佳答案
z-index 仅在您指定了用于布局组件的位置时才起作用。否则它就行不通。这意味着 z-index 适用于:定位元素
关于html - IE Z 索引问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13161575/