blockUI page block 居中

http://yunlong167167.iteye.com/blog/1533811


var __widowWidth = $(window).width();
var __popWidth = $("#Loading").width(); //Loading为要显示的div
var __left = (__widowWidth - __popWidth)/2 + 'px';
var __windowHeight = $(window).height();
var __popHeight = $("#Loading").height();
var __top = (__windowHeight-__popHeight)/2 + 'px';
$.blockUI({ message: $('#Loading'),
css:{
cursor: '',
left:__left,width:__popWidth+'px',top:__top,position:'fixed', //居中
border: 'none', // 无边界
width:"100px" // 中间框框的宽度
},
overlayCSS:{cursor: ''}
});


适当修改就行。



你可能感兴趣的:(jquery插件)