简单的loading加载
2017-07-20 本文已影响75人
Superbsco
<!-- 在body下写 -->
<div id="loading" style="position: absolute;width: 100%;height: 100%;z-index:888;display:none;">
<img src="imgage/loading.gif" style="position: relative;left: 50%;top: 48%;">
<br />
<span style="position: relative;left: 48%;top: 49%;">数据正在加载中...</span>
</div>
$.ajax({
url:"ajax_Video",
dataType:"json",
beforeSend:function () {
$("#loading").css("display","block");
},
complete:function(){
$("#loading").css("display","none");
},
success:function (data) {
}
送上loading.gif(右键保存即可):
右键保存效果图: