我正在使用带有metronic和laravel的bootbox插件v4.3.0并遇到这个奇怪的问题;
$('#signup').click(function()
{
bootbox.alert('some message');
}
<div style="z-index: 10051;" class="modal-scrollable">
<div aria-hidden="false" style="display: block; margin-top: -88px;" class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<button style="margin-top: -10px;" type="button" class="bootbox-close-button close" data-dismiss="modal" aria-hidden="true">×</button>
<div class="bootbox-body">ll</div>
</div>
<div class="modal-footer">
<button data-bb-handler="ok" type="button" class="btn btn-primary">OK</button>
</div>
</div>
</div>
</div>
</div>
答案 0 :(得分:1)
问题在于bootstrap bs3补丁CSS文件。我已经提出了一个解决方案,它基本上颠倒了它对bootbox所做的更改,如果你有的话,它将放在bootstrap-modal-bs3patch.css
或你的主/从布局中。另请注意,我是初级CSS程序员。
.bootbox {
left: auto !important;
width: auto !important;
margin-left: auto !important;
background-color: transparent !important;
border: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
position: relative !important;
top: 50% !important;
overflow: visible !important;
transition: opacity 0.15s linear 0s !important;
}