【问题标题】:jQuery dialog popup behind my blog content. How to fix我的博客内容后面的 jQuery 对话框弹出窗口。怎么修
【发布时间】:2012-05-09 02:04:55
【问题描述】:

这个问题我已经处理了一段时间了。我的对话框似乎在我的博客内容后面弹出。这是一个屏幕截图。 http://wsoplugins.com/wp-content/uploads/2012/04/Capture.png 有人可以帮我解决这个问题吗? 它会在标题内容后面弹出以进行具体说明。下面的其他内容似乎很好。 非常感谢。

.ui-dialog{

position: fixed;
z-index: 99999;

}

【问题讨论】:

  • 标题和对话框弹出的 CSS 属性是什么?

标签: jquery css user-interface dialog


【解决方案1】:

尝试更改您的z-index

例如:

#myPopup{
    z-index: 9999;
}

编辑
有你的问题:

position: fixed;

您的职位需要是relativeabsolute

【讨论】:

  • 谢谢 DC 终于让它工作了。立场的事情。天哪,这很容易。再次感谢。
  • 如果我的位置必须固定 - 在可滚动的屏幕中间位置怎么办?
【解决方案2】:

您可以在创建对话框时设置 zIndex 选项;

zIndex: 12000 //you can set much more

【讨论】:

    【解决方案3】:

    有时将z-index 属性放在相邻的元素包装器上是明智的。 z-index 工作所需的唯一条件是元素应该通过position 属性相对、绝对或固定定位。

    例如HTML:

    <div class="nav">
    Multiple div's here with some text or whatever elements, some of them with z-index
    </div>
    <div class="main_content">
    Multiple div's here with some text or whatever elements, some of them with z-index
    </div>
    

    CSS:

    .nav{
        position: relative; //fixed, or absolute, otherwise z-index doesn't work
        z-index: 40;
    }
    .main_content{
        position: relative; //fixed, or absolute, otherwise z-index doesn't work
        z-index: 30; // setting it lower than the previous block
    }
    

    您可以添加此类 css 以确保 main_content div 中 nav 之后的任何内容都将以较低的 z-index 值定位。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多