加载完我为什还有加载图片

来源:2-1 网页加载进度条误区

cym01494

2017-07-18 11:20

<!doctype html>

<html>

<head>

<title>定时器进度条</title>

<meta charset="utf-8" >




<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-migrate-1.4.1.min.lnk"></script>

<script> 

$(function(){

  setInterval(function(){

   $(".loading").fadeOut();

  },3000)

  })


</script>

</head>


<body>

<div>

   <div></div>

</div>


<img src="https://ss1.baidu.com/-4o3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=457a6f3b9d2bd4075dc7d5fd4b899e9c/9f2f070828381f30a57a7cbaa3014c086e06f046.jpg" alt=""/>

<img src="https://ss3.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=dfeb28dadd2a60594d10e71a1835342d/d4628535e5dde7111e0b87e5adefce1b9c1661cc.jpg" alt=""/>

<img src="https://ss2.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=7e78862a4136acaf46e090fc4cd88d03/18d8bc3eb13533fa371c563da2d3fd1f41345b7f.jpg" alt=""/>

<img src="https://ss1.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=581bc800d754564efa65e23983de9cde/80cb39dbb6fd5266c159c807a118972bd40736b6.jpg" alt=""/>

</html>

</html>

http://img.mukewang.com/596d7e520001b0ca12980601.jpg

写回答 关注

1回答

  • sifort
    2017-07-18 13:06:51

    <script src="js/jquery-migrate-1.4.1.min.lnk"></script>, 这个引用的是什么?

    另外下面最好不要用 setInterval, 用 setTimeout


常用的网页加载进度条

通过课程,让你学习到网页中常见的进度加载的实现方式.

32872 学习 · 81 问题

查看课程

相似问题