Bootstrap Modal 垂直居中 在 bootstrap.js中修改如下代码:

Modal.prototype.adjustDialog = function () {

var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight

 

this.$element.css({

paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',

paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''

})

// 是弹出框居中。。。

var $modal_dialog = $(this.$element[0]).find('.modal-dialog');

var m_top = ( $(window).height() - $modal_dialog.height() )/2;

$modal_dialog.css({'margin': m_top + 'px auto'});

}

 

Bootstrap Model点击空白处 popup会关闭:

增加属性
data-backdrop="static"

最新文章

  1. ppmoney 总结二
  2. error C2144: 语法错误:“int”的前面应有“;”
  3. 通过 UDP 发送数据的简单范例
  4. MVC – 5.MVC设计模式和.NetMVC框架
  5. parentNode,offsetParent
  6. Liferay7 BPM门户开发之35: AssetTag的集成查询
  7. mycat服务启动{管理模块启动过程}
  8. iOS Storyboard 的基本用法
  9. MySQL的 inner join on 与 left join on
  10. PHP学习路径
  11. Newton‘ method 的优缺点
  12. 写一个Vue loading 插件
  13. Docker 使用 Dockerfile 构建自己的镜像
  14. 10个最佳Node.js企业应用案例:从Uber到LinkedIn
  15. 从零开始学 Web 之 ES6(二)ES5的一些扩展
  16. Linear Algebra(未完待续)
  17. P3605 [USACO17JAN]Promotion Counting晋升者计数
  18. Unity3D学习笔记(三十三):矩阵
  19. 【opencv基础】pointPolygonTest
  20. hbase 过滤器属性及其兼容性

热门文章

  1. 在sharepoint2013中如使用PowerView
  2. include的用法例子,以及include+merge的用法例子
  3. UITableViewHeaderFooterView的封装
  4. Objective-C Runtime 运行时之一:类与对象
  5. Solr实现Low Level查询解析(QParser)
  6. 【代码笔记】iOS-UIView的placeholder的效果
  7. Android中的HTTP通信
  8. RMAN冷备份异机还原
  9. RHEL 5.7 Yum配置本地源[Errno 2] No such file or directory
  10. SQL SERVER 2012 执行计划走嵌套循环导致性能问题的案例