慕仔7231597
2017-07-17 13:58
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>定时器的进度条</title>
<style type="text/css">
.loading{width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 100; background-color: #fff;}
.loading .pic{width: 64px; height: 64px; background: url(images/loading.gif); position: absolute; top: 0;bottom: 0; left: 0; right: 0; margin: auto;}
</style>
<script src = "js/jquery-3.2.1.min.js"></script>
<script>
$(function(){
setInterval(function()){
$(".loading").fadeOut();
},3000)
})
</script>
</head>
<body>
<div>
<div></div>
</div>
<img src="http://e.hiphotos.baidu.com/zhidao/pic/item/54fbb2fb43166d2243b1069a402309f79152d2fd.jpg" alt=""/>
<img src="http://a.hiphotos.baidu.com/zhidao/pic/item/3c6d55fbb2fb4316352d920a22a4462309f7d394.jpg" alt=""/>
<img src="http://h.hiphotos.baidu.com/zhidao/pic/item/d439b6003af33a872e9fa4dac35c10385243b504.jpg" alt=""/>
</body>
</html>
你确定是浏览器的问题?
检查下jq
$(function(){
setInterval(function(){
$(".loading").fadeOut();
},3000)
})
常用的网页加载进度条
32872 学习 · 81 问题
相似问题