只需代理modal-open
类用于如下引导:
.bs-modal-open {
overflow: hidden;
}
.bs-modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
// or using sass …
.bs-modal-open {
@extend .modal-open;
}
添加/删除
bs-modal-open
打开/关闭BS模式时,对车身进行分类:
$(\'.bs-modal\')
.on(\'show.bs.modal\', function (e) {
$(\'body\').addClass(\'bs-modal-open\');
})
.on(\'hidden.bs.modal\', function (e) {
$(\'body\').removeClass(\'bs-modal-open\');
});
最后添加
bs-modal
向您的每个BS模态分类:
<div class="modal bs-modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
…
</div>