[html]代码库
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>加载中</title>
</head>
<!-- jQuery -->
<script src="../js/jquery.min.js"></script>
<style>
.cover {
text-align: center;
position: fixed;
left: 500px;
top: 200px;
}
/* #loading {
position: relative;
left: 20px;
top: -10px;
width: 30px;
height: 30px;
display: none;
}*/
#loading {
position: relative;
left: 5px;
top: 1px;
width: 50px;
height: 20px;
display: none;
}
</style>
<body>
<div class="cover">
<button class="cover" id="saveBtn" onclick="test()">测试按钮</button>
<!--<img id="loading" src="../img/loading.gif"/>-->
<img id="loading" src="../img/loading2.gif"/>
<button id="closeBtn" onclick="testBtn1()">关闭</button>
</div>
</body>
<script>
function test() {
$('#saveBtn').css('opacity', '0.2');
/*$('#loading').css('display', 'block');*/
$('#loading').css('display', 'block');
}
function testBtn1() {
$('#saveBtn').css('opacity', '');
/*$("#loading").css('display', 'none');*/
$("#loading").css('display', 'none');
}
</script>
</html>
[源代码打包下载]
by: 发表于:2017-12-19 09:42:57 顶(0) | 踩(0) 回复
??
回复评论