//模态框剧中
function centerModals() {
$('.modal').each(function (i) {
var $clone = $(this).clone().css('display', 'block').appendTo('body');
var top = Math.round(($clone.height() - $clone.find('.modal-content').height()) / 2);
top = top > 0 ? top : 0;
$clone.remove();
$(this).find('.modal-content').css("margin-top", top);
});
}
$('.modal').on('show.bs.modal', centerModals);
$(window).on('resize', centerModals);bootstrap 3.3 模态框垂直居中问题
本文链接:https://lxyit.com/article/show/95.html
-- EOF --
作者 admin 发表于 2016-01-16 10:29:56 ,最后修改于 2016-01-16 10:30:28