使用以下CSS无法使用AJAX阻塞div ...任何线索? 谢谢!
HTML
<div id="busy"></div>
JavaScript
$.ajaxSetup({
beforeSend: function () {
$("#busy").show();
},
complete: function () {
$("#busy").hide();
}
});
CSS
#busy {
width:100%;
height:100%;
opacity: 0.4;
filter: alpha(opacity=40); /* For IE8 and earlier */
background-color:grey;
z-index:9999;
}
答案 0 :(得分:3)
您的元素位置static
,需要定位relative
,absolute
或fixed
以获得维度
#busy {
position: absolute;
width:100%;
height:100%;
opacity: 0.4;
filter: alpha(opacity=40); /* For IE8 and earlier */
background-color:grey;
z-index:9999;
}