jQuery对话框-如何为每个对话框使用不同的样式?

jQuery对话框-如何为每个对话框使用不同的样式?,jquery,css,jquery-ui,jquery-ui-dialog,jquery-dialog,Jquery,Css,Jquery Ui,Jquery Ui Dialog,Jquery Dialog,我在一个网站上使用jQueryUI对话框进行不同的对话。现在我想知道是否有一种简单的方法可以为不同的对话框使用不同的风格 <div id="dialog-confirm" title="Title of dialog" style="//put your styling here" >Text of dialog</div> 例如,像“真的删除…”这样的警报应具有与其他消息不同的样式 现在,对话框中使用了一些类: <div id="dialog

我在一个网站上使用jQueryUI对话框进行不同的对话。现在我想知道是否有一种简单的方法可以为不同的对话框使用不同的风格

         <div id="dialog-confirm" title="Title of dialog" style="//put your styling here" >Text of dialog</div> 
例如,像“真的删除…”这样的警报应具有与其他消息不同的样式

现在,对话框中使用了一些类:

<div id="dialog-confirm" title="Title of dialog">Text of dialog</div>
为不同的对话框提供不同风格的最佳方式是什么

         <div id="dialog-confirm" title="Title of dialog" style="//put your styling here" >Text of dialog</div> 
然后你可以在另一个地方使用

                $( "#dialog-confirm1" ).dialog({
        height: 140,
        modal: true
         });
如果您想使用css类,那么可以使用jQuery向DIV添加不同的类,然后添加!覆盖来自jQuery UI的样式很重要


也可以直接从jQuery站点:

$( ".selector" ).dialog({ dialogClass: "alert" });
上面说

指定的类名将添加到对话框中,以进行其他主题设置

                $( "#dialog-confirm1" ).dialog({
        height: 140,
        modal: true
         });
                background-color: #454545 !important;
                color: #000 !important;
$( ".selector" ).dialog({ dialogClass: "alert" });