我有经典的问题,我的标题导航栏是在我的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="www.flytheflagtexas/athens/magazine/latest/index.html" ></iframe> </div> <![endif]--> ....code....为什么不z-index: 2 iframe出现在什么东西下? 这是页面: www.flytheflagtexas/athens/latest可以自由地浏览代码
Why wont the z-index:-2 iframe appear under anything? Here is the page: www.flytheflagtexas/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
发布评论