下拉列表的 z-index 不会与 iframe 一起运行
我在页面上嵌入了谷歌日历(位于 iframe 中),
目前我正在尝试在 Chrome 中解决这个问题,但我希望它能够在所有情况下工作。
这是一般结构的简短摘要(实际代码更复杂)
<header>
<ul id="nav">
<li> <ul class="drop_down">
<li>Nav item</li>
<li>nav item</li>
</ul>
</li>
<li> <ul class="drop_down">
<li>Nav item</li>
<li>nav item</li>
</ul>
</li>
</ul>
</header>
<iframe />
iframe 的目的是重叠一点并出现在它的前面。下拉菜单应该出现在 iframe 前面。所以 z-index 层应该是从后到前:
- header (只有背景图像才是最重要的)
- iframe
- drop down
iframe menu
我似乎无法做到这一点。我尝试在所有涉及的事情上使用position:absolute来非常具体。
这是问题页面的实时链接: 编辑:已删除链接,因为它与工作相关并已解决
预期的菜单行为位于该网站的主页上。
有什么建议吗?
I have an embedded google calendar on a page (which is in an iframe)
I'm trying to solve this in Chrome at the moment, but I'd prefer it to work in everything.
Here's a short summary of the general structure (actual code is more convoluted)
<header>
<ul id="nav">
<li> <ul class="drop_down">
<li>Nav item</li>
<li>nav item</li>
</ul>
</li>
<li> <ul class="drop_down">
<li>Nav item</li>
<li>nav item</li>
</ul>
</li>
</ul>
</header>
<iframe />
The iframe is intended to overlap the a little and appear in front of it. The drop down menu should then appear in front of the iframe. So the z-index layers should be from back to front:
- header (just the background image is all that matters)
- iframe
- drop down
iframe menu
I can't seem to make this happen. I tried being very specific using position:absolute on everything involved.
Here's a live link to the problem page:
Edit: Removed link since it's work related and solved
Expected menu behavior is on the homepage of that site.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是你的 iframe 的 zindex 是 1000,而你的菜单是 z-index:1
The problem is that your zindex for the iframe is 1000, while your menu was z-index:1