Css 需要区分bootbox.alert()和bootbox.confirm(),这两种模式都在同一页面中

Css 需要区分bootbox.alert()和bootbox.confirm(),这两种模式都在同一页面中,css,bootbox,Css,Bootbox,我在同一个页面中有多个bootbox.alert()和bootbox.confirm()模型,需要清楚地添加不同的样式,但目前为止运气不佳,我如何为这些模型定义自己的样式类 var alertModal = bootbox.alert( { title: "<i class='fa fa-exclamation-circle' style='font-size: 20px; color: white'></

我在同一个页面中有多个bootbox.alert()和bootbox.confirm()模型,需要清楚地添加不同的样式,但目前为止运气不佳,我如何为这些模型定义自己的样式类

var alertModal = bootbox.alert(
                {
                    title: "<i class='fa fa-exclamation-circle' style='font-size: 20px; color: white'></i> Alert",
                    message: "Please select Patient from Queue",
                })
            alertModal.find('.modal-header')
                .css(
                {
                    'background-color': 'red',
                    'color': 'white'
                }
                );
            alertModal.find('.modal-footer')
                .css({
                    'background-color': 'green',
                    'color': 'white'
                }
                );
var-alertModal=bootbox.alert(
{
标题:“警报”,
消息:“请从队列中选择患者”,
})
alertModal.find('.modal头')
.css(
{
“背景色”:“红色”,
“颜色”:“白色”
}
);
alertModal.find(“.modal页脚”)
.css({
“背景色”:“绿色”,
“颜色”:“白色”
}
);
在文档链接中,您可以看到,提供了可选类名的选项

var alertModal = bootbox.alert(
{
    title: "<i class='fa fa-exclamation-circle' style='font-size: 20px; color: white'></i> Alert",
    message: "Please select Patient from Queue",
    className:"your custom class name here"
})
var-alertModal=bootbox.alert(
{
标题:“警报”,
消息:“请从队列中选择患者”,
className:“此处为您的自定义类名”
})
您可以为警报创建单独的类,并在文档链接的选项中确认和传递警报,您可以看到,提供了可选类名称的选项

var alertModal = bootbox.alert(
{
    title: "<i class='fa fa-exclamation-circle' style='font-size: 20px; color: white'></i> Alert",
    message: "Please select Patient from Queue",
    className:"your custom class name here"
})
var-alertModal=bootbox.alert(
{
标题:“警报”,
消息:“请从队列中选择患者”,
className:“此处为您的自定义类名”
})

您可以为警报和确认创建单独的类,并将其传递到选项中

,这非常容易通过引导框进行配置。非常感谢Gautam Naik。通过bootbox进行配置非常简单。非常感谢乔塔姆·奈克。