【问题标题】:z-index with position absolute vs. IE绝对位置与 IE 的 z-index
【发布时间】:2011-07-18 22:23:05
【问题描述】:

有人可以帮我解决我在菜单上遇到的这个问题吗? 问题仅在兼容模式下的 IE 中。我有绝对位置和 z-index 99999999 的菜单,但菜单仍然隐藏在内容后面。 请检查:

http://www.tomasdostal.com/projects/modul16/draft2/?page=buildings

感谢您的建议

【问题讨论】:

    标签: css internet-explorer internet-explorer-7 positioning z-index


    【解决方案1】:

    我有绝对位置和 z-index 99999999 的菜单

    您需要使用更高z-index

     

     

    ..开玩笑的。

    兼容模式下的 IE = IE7。

    IE7 有 z-index 的已知错误,请参阅:IE7 Z-Index issue - Context Menu

    在这种特定情况下,解决此问题的一种方法是将z-index: 1 添加到作为菜单父级的<div class="grid_3">

    【讨论】:

    • 是的,我使用了 99999999,因为我在网上找到了它,通常我使用不超过 100.... 奇怪的是,grid_3 上的 z-index:1 成功了!谢谢!
    【解决方案2】:

    Z-index 仅适用于绝对定位(元素当前相对于其父元素定位)。将以下 CSS 添加到 .menu_wrap。

    position: absolute;
    top: 0;
    left 0;
    

    【讨论】:

      猜你喜欢
      • 2012-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-03
      • 2013-01-07
      • 2013-02-09
      • 1970-01-01
      • 2016-02-22
      相关资源
      最近更新 更多