jquery blockUI 居中显示

83453065 2012-05-17

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:''}

});

相关推荐

ELEMENTS爱乐冬雨 / 0评论 2020-05-29