预加载动画( 采用加载图片的方式 )
css样式:
<style>
.spinner {
width: 100%;
height: 100%;
line-height: 100%;
text-align: center;
position: absolute;
z-index: 9999;
background: rgba(233,233,233,0.6);
display: none;
}
</style>
html内容:
<html>
<div class="spinner">
<img src="images/jiazai.gif" alt=""/>
</div>
</html>
js数据加载完之前:
//显示遮罩
$(".spinner").show();
js数据加载完之后:
//隐藏遮罩
$(".spinner").hide();