<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>js加载中</title>
<script type="text/javascript" src="js/jquery.min.js" ></script>
<style>
body{background: lightskyblue;}
.box{background: rgba(0,0,0,0.5); color: #000;border-radius: 10px; z-index: 999; text-align: center; position: absolute;width:200px;height: 80px; left: 50%;top: 50%;margin-left: -100px;margin-top: -40px;}
.box .img{background: url('images/loding.gif') no-repeat; height: 30px; width: 30px;margin: 0 auto;margin-top: 10px;background-size: contain;}
.box .text{font-size: 14px; padding-top: 5px;color: #fff;}
</style>
</head>
<body>
<script type="text/javascript">
$(function (){
loading('加载中...'); //可以改变文字
function loading(text){
var loading_box = $("<div class='box'><div class='img'></div><div class='text'>"+text+"</div></div>");
$("body").append(loading_box);
setTimeout(function (){
$(".box").hide(); //关闭缓冲效果
}, 3000);
}
});
</script>
</body>
</html>
js加载中
最新推荐文章于 2023-09-03 22:32:59 发布