var editorB = new UE.ui.Editor({ initialFrameHeight: 350, initialFrameWidth: 600 });
        editorA.render("ScienceContentA");
        editorB.render("ScienceContentB");
        $(function () {
            //$("#AddUpdateModalA").modal("hide").css({
            //    //top: 0,
            //    left:0,
            //    "margin-top": function () {
            //        //return -$(window).height()/2 + ($(window).height() - $(this).height()) / 2;
            //        return - ($(this).height() / 2)-70;
            //    },
            //    "margin-left": function () {
            //        return ($(window).width() - $(this).width())/2;
            //    }
            //});
            $('.modal').on('show.bs.modal', centerModals);
            $(window).on('resize', centerModals);
            //PageQuery();//分页查询数据
        });
        //模态框水平垂直居中函数
        function centerModals() {
            $('.modal').each(function (i) {
                var top = -($(this).height() / 2) - 70;
                var left = ( $ (window).width() - $(this).width()) / 2;
                $(this).css("margin-top", top);
                $(this).css("margin-left", left);
            });
        }

Boostrap 模态框 水平垂直居中问题的更多相关文章

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

    Bootstrap(v3.2.0)模态框(modal)垂直居中方法: 在bootstrap.js文件900行后面添加如下代码,便可以实现垂直居中. that.$element.children().e ...

  2. Boostrap模态框,以及通过jquery绑定td的值,使模态框回显

    做页面不管是登录或是修改信息,难免会使用到模态框,在此分享一个比较漂亮的模态框 Boostrap模态框 使用之前首先导入jquery-3.2.1.min.js,和bootstrap.min.js 先添 ...

  3. Bootstrap3模态框Modal垂直居中样式

    1,Bootstrap 模态框插件Bootbox垂直居中样式: <!DOCTYPE html> <html lang="en"> <head> ...

  4. boostrap 模态框

    <div class="modal fade" id="myModal" tabindex="-1" role="dialo ...

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

    http://v3.bootcss.com/ 自己也试了改了几种方式也不容乐观,发现在窗口弹出之前是获取不到$(this).height()的值,本想着是用($(window).height()-$( ...

  6. JavaScript:bootstrap 模态框的简单应用

    最近用上了bootstrap这个强大的前端框架,有空来总结一下.这里记录下模态框的简单应用. 首先,要在页面中引入相应的js.css文件 <link href="css/bootstr ...

  7. bootstrap模态框垂直居中

    很久没有写东西了,之前想写一些移动端的东西以后补上吧,移动端发展还是蛮快的,回正题. 因为最近在弄一个系统,系统中引用了bootstrap,发现模态框垂直不居中,遂搜索了一下,也都试了一下,无非都是在 ...

  8. BootStrap 模态框禁用空白处点击关闭,手动显示隐藏,垂直居中

    $('#ajax_wait').modal({ backdrop: 'static', keyboard: false }); backdrop:static ,空白处不关闭. keyboard:fa ...

  9. boostrap中模态框显示在阴影之下

    boostrap中模态框显示在阴影之下 出现这种情况的原因我开始也搞了很久,问题出现在哪里呢? 有事问百度,在百度上查了一下资料,他们主要的解决办法:是 修改标签的z-index属性的值, 我试着改了 ...

随机推荐

  1. javaweb 中的乱码问题

    一.post 方式 首先我们看下面一段代码,在该HTML中我们指定的编码为“UTF-8”,如图所示. 在该代码中,我们将表单数据提交给ParamServlet 处理 servlet 会将接收到的数据打 ...

  2. 遇到autoreconf: not found

    sudo apt-get install autoconf automake libtool

  3. JavaScript学习笔记 -- ES6学习(三) 变量的解构赋值

    1.解构赋值的定义 在ES6中,允许按照一定模式,从数组和对象中提取值(所谓解构),然后对变量进行赋值. var a = 1; var b = 2; var c = 3; //等价于 var [a, ...

  4. hibernate_validator_01

    1.环境准备(Maven工程) <?xml version="1.0" encoding="UTF-8"?> <project xmlns=& ...

  5. 例子: 自制Flask首页导航.

    # -*- coding:utf-8 -*- ''' Created on 2015年10月19日 ''' from flask import Flask, render_template impor ...

  6. UDP协议疑难杂症全景解析

    转载:http://blog.csdn.net/dog250/article/details/6896949 UDP协议疑难杂症全景解析 2011-10-22 19:26 2989人阅读 评论(4)  ...

  7. java.util.Dictionary源码分析

    Dictionary是一个抽象类,Hashtable是它的一个子类. 类的声明:/** The <code>Dictionary</code> class is the abs ...

  8. leetcode problem 32 -- Longest Valid Parentheses

    Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length ...

  9. 高效线程池之无锁化实现(Linux C)

    from:http://blog.csdn.net/xhjcehust/article/details/45844901 笔者之前练手写过一个小的线程池版本(已上传至https://github.co ...

  10. 使用WebBrowser的记录

    第一:新建一个类,用了获取WebBrowser元素的类 //需要引用 Interop.SHDocVw 和 Microsoft.mshtmlpublic class Element { //根据Name ...