关于bootstrap弹出层垂直居中的实现
/**
* 弹出层垂直居中
*/
function centerModals() {
$('#myModal').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 = to
原创
2018-12-25 16:08:28 ·
357 阅读 ·
0 评论