jQuery UI对话框背景

时间:2015-06-18 18:57:07

标签: jquery css jquery-ui jquery-ui-dialog

我试图填写对话框的背景但没有成功。

根据图片我的透明度。

enter image description here

我拥有的CSS是:

.ui-dialog {
    background-color: #e1e1e1; 
}

.ui-dialog .ui-dialog-content  {
    background-color: #e1e1e1;
}

但没有成功。

我正在覆盖alert()函数,因此我可以使用脚本任何部分的alert()

window.alert = function (message, callback) {
    $('<div />').text(message).dialog({
        modal:true,
        title:'DDB',
        dialogClass: 'alert',
        show: {
            effect: "scale",
            duration: 200
        },
        hide: {
            effect: "explode",
            duration: 300
        },
        buttons: {
            'OK':function(){
                $(this).dialog('close');
                callback();
            }
        },
        position: {
            my: 'center bottom',
            at: 'center bottom-30%',    
            //of: $("#mainspace"),
        },
        close:function(){ $(this).dialog('destroy').remove(); }
    });
}

0 个答案:

没有答案