bootstrap 3.3 模态框垂直居中问题
2016-09-23 17:09
465 查看
/* center modal */ 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 模态框垂直居中问题
- Bootstrap模态框(modal)垂直居中
- Bootstrap modal 模态框垂直居中
- Bootstrap模态窗- 垂直居中 & 拖动
- Bootstrap 模态框垂直居中处理
- bootstrap 模态框垂直居中实现方法
- bootstrap 模态框(modal)实现水平垂直居中显示
- bootstrap 模态框(modal)实现水平垂直居中显示的方法
- Bootstrap 模态框(modal)实现水平垂直居中显示
- Bootstrap 模态框垂直居中
- [js学习笔记]bootstrap中模态对话框水平垂直居中
- Bootstrap模态框水平垂直居中与增加拖拽功能
- 通过纯css样式将bootstrap模态框垂直居中
- Bootstrap弹出框(modal)垂直居中的问题及解决方案详解
- Bootstrap模态框(modal)垂直居中
- bootstrap 模态框垂直居中
- bootstrap多个modal模态框同时设置垂直居中的方法
- BootStrap模态框不垂直居中的解决方法
- BootStrap3.X模态框垂直居中显示
- Bootstrap 表格内容垂直居中的问题