通过以下代码,运行出现,图片加载比计时器快,是我的代码有问题,还是图片本来加载就可,其他的图片我也试过,并不能像老师运行显示加载完,再显示图片
<!doctype html>
<html>
<head>
<meta charset="utf-8" >
<title>定时器进度条</title>
<style>
.loading{width:100%;height:100%;postion:fixed;top: 0;left: 0;z-index: 100;background: #fff;}
.loading .pic{width:64px;height: 64px;border: 1px solid red;position: absolute;top:0;bottom:0;left:0;right:0;margin: auto;background:url("images/loading.gif");}
</style>
<script src="js/jquery-3.2.1.min.js"></script>
<script>
$(function(){
setTimeout(function(){
$(".loading").fadeOut();
} ,3000)
})
</script>
</head>
<body>
<div>
<div></div>
</div>
<img src="http://img1.imgtn.bdimg.com/it/u=754131577,1671524070&fm=26&gp=0.jpg" alt=""/>
<img src="http://img3.imgtn.bdimg.com/it/u=3435466924,3415045389&fm=26&gp=0.jpg" alt=""/>
</html>
</html>