【问题标题】:jquery dialog box overlapping with page contentsjquery 对话框与页面内容重叠
【发布时间】:2015-09-02 11:55:50
【问题描述】:

我的帐户页面中有一个 jquery 对话框。当对话框出现时,它与页面内容重叠。请在此处查看图片。

http://s7.postimg.org/dxsg3u417/Capture.png

对话框的代码是:

$('<div id="ratingloaderDiv"></div>').load("ratingDialog.jsp?id=" + id, function () {
    rateDialog = $(this).dialog({
        autoOpen: true,
        minHeight: 275,
        width: 400,
        height: 350,
        modal: true,
        open: function (event, ui) {
            var rating = 0;
            $('.rateCls' + id).rating({
                callback: function (value, link) {
                    rating = value;
                }
            });
            //more code goes.

谁能建议如何避免与页面内容重叠?

【问题讨论】:

  • 为对话框设置 z-index。

标签: jquery html jquery-dialog


【解决方案1】:

在其他内容的z-index上方增加对话框的z-index

例如:

body {
    z-index: 100;
}
.dialog {
    z-index: 101;
}

【讨论】:

  • @user3681970 上面显示的代码只是您如何解决问题的一个示例。检查模式前面显示的选项卡并相应地更新对话框的z-index
猜你喜欢
  • 1970-01-01
  • 2020-03-31
  • 1970-01-01
  • 2018-12-04
  • 2015-10-06
  • 2014-08-01
  • 1970-01-01
  • 2017-06-16
相关资源
最近更新 更多