首页 > 其他 > 详细

Bootstrap(v3.2.0)模态框(modal)垂直居中

时间:2014-10-22 14:16:29      阅读:2441      评论:0      收藏:0      [点我收藏+]

Bootstrap(v3.2.0)模态框(modal)垂直居中方法:

在bootstrap.js文件900行后面添加如下代码,便可以实现垂直居中。

 

that.$element.children().eq(0).css("position", "absolute").css({
          "margin":"0px",
          "top": function () {
              return (that.$element.height() - that.$element.children().eq(0).height()-40) / 2 + "px";
          },
          "left": function () {
              return (that.$element.width() - that.$element.children().eq(0).width()) / 2 + "px";
          }
      });

 

Bootstrap(v3.2.0)模态框(modal)垂直居中

原文:http://www.cnblogs.com/haha12/p/4042799.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!