我正在使用 Bootstrap 3 中的 Bootbox 4 在 IE(IE 8 / IE 9) 上,一切都按照预期工作。
在 Bootstrap 3 中,您可以像以下 CSS 设置模态框宽度,但是,任何类似此类的更改都会影响到我的所有模态框:
.modal-dialog {
width:70% !important;
}
CSS、jQuery 或 Bootbox 的设置中是否有一种方法可以仅针对一个特定的modal更改Bootbox警示 modal 的宽度?Bootbox页面只有很短的文档,我在其他任何地方都找不到相关信息。
更新:
创建特定模态窗口的 JS(带有示例数据):
bootbox.dialog({
message: " \
<table class='table table-hover'> \
<thead> \
<tr> \
<th>Item Name</th> \
<th>Location</th> \
<th>Path</th> \
<th>Last Update</th> \
</tr> \
</thead> \
<tbody> \
<tr> \
<td>Item 1</td> \
<td>Navbar - Level 2</td> \
<td>Products - blabla</td> \
<td>Added by xxx on 05 Aug 2014</td> \
</tr> \
</tbody> \
</table>",
title: "Search Results",
buttons: {
main: {
label: "Close",
className: "btn-primary"
}
},
className: "modal70"
});
以下是我的当前CSS:
.modal-dialog.modal70 {
width:70% !important;
}