Initial Commit
This commit is contained in:
35
animation/loading.html
Normal file
35
animation/loading.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="./loading.css" type="text/css" />
|
||||
<script>
|
||||
function simulatePageLoad() {
|
||||
var progressBar = document.querySelector('.loading');
|
||||
var progress = 0;
|
||||
var interval = setInterval(function () {
|
||||
progress += 10;
|
||||
if (progress <= 100) {
|
||||
progressBar.style.setProperty('--progress', progress + '%');
|
||||
} else {
|
||||
clearInterval(interval);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="simulatePageLoad()">
|
||||
<div class="loading">
|
||||
<div class="item"></div>
|
||||
<div class="item"></div>
|
||||
<div class="item"></div>
|
||||
<div class="item"></div>
|
||||
<div class="item"></div>
|
||||
<div class="item"></div>
|
||||
<div class="item"></div>
|
||||
<div class="item"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user