左上角对齐块UI消息?

时间:2010-10-04 09:29:16

标签: jquery

我正在尝试将阻止元素左上角的块ui消息对齐但不成功? centerX,centerY选项是否仅适用于页面阻止?

$('#Block').block({message:'<h2> <IMG SRC="images/ajax-loader.gif" /> Please wait...</h2>',centerY:0,css: { border: '3px solid #a00' }});   

1 个答案:

答案 0 :(得分:3)

这是我的方式:

<script type="text/javascript" src="http://github.com/malsup/blockui/raw/master/jquery.blockUI.js?v2.34"></script>

<div id="Block" style="border:1px solid #000; width:300px; height:300px; display:block;"><a href="#">coucou</a></div>


$('#Block').block(
    {
        message:'<h2> <IMG SRC="images/ajax-loader.gif" /> Please wait...</h2>',
        centerY:0,
        centerX:false,
        css: { top: '10px', left: '', right: '10px'  }
    }
); 

jsFiddle