展开 IE7 中图库下方出现的菜单
我有一个正在工作的彩色菜单(“Destaques”、“Roupas”、“Sapatos”和“Fale Conosco”),但 IE7 位于页面上的画廊后面,因为我尝试使用 z-index 来解决问题,但没有任何结果似乎有效,有人有任何提示吗?
使用 IE7 将鼠标悬停在菜单上即可了解我在说什么。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里发生了很多事情,但我会尝试解决它。
首先,尝试验证您的 HTML。有很多无效的 HTML 可能会导致问题。
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.montepage.com.br%2Finfantile%2F&charset=%28detect+automatically%29&doctype=Inline& ;group=0
其次,我相信 IE7 对 z-index 做了一些有趣的事情。它会根据其父项重置其 z 索引。我知道我过去遇到过这个问题。基本上,如果两个父元素像这样:
如果“parent1”的 z-index 低于“parent2”,则“parent1”的所有子元素都将低于“parent2”,无论它们的 z-index 值如何。您可以尝试做的是确保“parent1”具有更高的 z-index。
从你的代码来看,父元素似乎是:
看看将“colorido”设置为比“corpo”更高的 z-index 是否有效。您可能必须将它们设置为“position:relative”才能正常工作。
我很难阅读 HTML 和 CSS,这里发生了很多事情。所以,我可能有错误的容器,但希望这个想法可以帮助你。
此页面可能有助于找到一些答案以及一些其他可以尝试的技巧:
http://aplus.rs/ css/ie7-bug-will-not-render-z-index-change-on-lihover/
希望有帮助!
There's a lot going on here, but I'll try to take a crack at it.
First, try to work on getting your HTML to validate. There's a lot of invalid HTML that could be leading to issues.
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.montepage.com.br%2Finfantile%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
Second, I believe IE7 does something funny with z-index. It sort of resets it's z-index based on it's parent. I know I've ran into this issue in the past. Basically, if two parent elements like this:
If "parent1" has a lower z-index than "parent2", all children of "parent1" will be lower than "parent2", regardless of their z-index value. What you can try to do is make sure "parent1" has a higher z-index.
From looking at your code, it seems like the parent elements are:
See if setting "colorido" to a higher z-index than "corpo" works. You might have to set them to "position:relative" so that it works.
It's hard for me to read that HTML and CSS, there's a lot going on here. So, I might have the wrong containers, but hopefully the idea can help you.
This page might help lead to some answers as well as some other tricks to try:
http://aplus.rs/css/ie7-bug-will-not-render-z-index-change-on-lihover/
Hope that helps!