-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathloadingSimple.html
More file actions
49 lines (46 loc) · 1.12 KB
/
loadingSimple.html
File metadata and controls
49 lines (46 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Página de Carregamento</title>
<style>
#loading {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.7);
z-index: 9999;
}
#loading-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div id="loading">
<div id="loading-content">
<p>Carregando...</p>
</div>
</div>
<!-- Seu conteúdo HTML normal vai aqui -->
<h1>Minha Página</h1>
<p>Conteúdo da página.</p>
<script>
// Mostrar o indicador de carregamento ao iniciar o carregamento da página
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("loading").style.display = "block";
});
// Esconder o indicador de carregamento quando a página estiver completamente carregada
window.addEventListener("load", function() {
document.getElementById("loading").style.display = "none";
});
</script>
</body>
</html>