Skip to content

Commit

Permalink
added custom preloader
Browse files Browse the repository at this point in the history
  • Loading branch information
bhat-shubham committed Sep 17, 2024
1 parent 2bde03d commit fae0b80
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
Binary file added img/preloader - Made with Clipchamp.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<body>
<body onload="hideLoader()">
<div id="loader">
<img src="img/preloader - Made with Clipchamp.gif">

</div>
<div class="side-navbar">
Expand Down
9 changes: 6 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ faqBoxes.forEach(faqBox => {
});
var loaderElement = document.getElementById("loader");

function hideLoader() {
loaderElement.style.display = "none";
}
// function hideLoader() {
// loaderElement.style.display = "none";
// }
setTimeout(function() {
loaderElement.style.display="none";
},5000);
15 changes: 11 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,19 @@ body {
position: fixed;
width: 100%;
height: 100vh;
margin: 0 auto;
background-color: #111;
display: flex;
justify-content: center;
align-items: center;
/* margin: 0 auto; */
background-color: #000;
z-index: 999;
}
#loader img{
width: 20%;
height: 20%;
}

#loader:before {
/* #loader:before {
content: "";
position: absolute;
bottom: 50%;
Expand All @@ -72,7 +79,7 @@ body {
border-radius: 50%;
background: #2a9d8f;
animation: loading-bounce 0.5s ease-in-out infinite alternate;
}
} */

/* #loader:after {
content: "";
Expand Down

0 comments on commit fae0b80

Please sign in to comment.