IE (IE 8 / IE 9) で Bootstrap 3 とともに Bootbox 4 を使用していますが、すべてが意図したとおりに動作します。
Bootstrap 3 では、次のように CSS でモーダル幅を設定できるように見えますが、このようなものはすべてのモーダルを変更します。
.modal-dialog {
width:70% !important;
}
CSS、jQuery、または Bootbox 設定で、特定の 1 つのモーダルに対してのみ Bootbox アラート モーダルの幅を変更できる方法はありますか? 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;
}