CSS样式
#loading{
width: 100%;
height: 100%;
background-color: #ffffff;
position: fixed;
top:0;
left: 0;
z-index: 9999;
}
#loading >i{
width: 64px;
height: 64px;
position: absolute;
top:0;
bottom:0;
left:0;
right: 0;
margin: auto;
background: url("") no-repeat;
}
JS代码
document.onreadystatechange = function () {
if (document.readyState === "complete") {
$(document).ajaxStop(function () {
$("#loading").fadeOut();
});
}
}
html页面就省略了 ,