Bonsoir,
Je souhaiterais mettre ce loading :
https://codepen.io/worodhazam/pen/NWyxRYZ
sur mon site, mais je suis loin d'avoir le même résultats.
Mes CSS :
Mon HTML :Code:
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 #chargement { position: absolute; top: 50%; bottom: 0; left: 50%; right: 0; z-index: 99999999999999; transform: translate(-50%, -50%); color: white; background-color: black; box-sizing: border-box; Margin: 0; } #chargement span { font-size: 80px; letter-spacing: 5px; text-transform: uppercase; line-height: 1; mix-blend-mode: difference; } #chargement::before { content: ""; position: absolute; left: 0; top: 0; width: 100px; height: 100%; background-color: white; animation: move 4s linear infinite; } @keyframes move { 0%, 100% { left: 0; } 50% { left: calc(100% - 100px); } }
et mon JS :Code:<div id="chargement"><span>Loading</span></div>
Merci pour votre aide et bonne soirée :)Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <script> document.onreadystatechange = function() { if (document.readyState != "complete") { document.querySelector("body").style.visibility = "hidden"; document.querySelector("#chargement").style.visibility = "visible"; } else { document.querySelector("#chargement").style.display = "none"; document.querySelector("body").style.visibility = "visible"; } }; </script>