Skip to content

Commit 6e36d9a

Browse files
author
Akanksha Raghav
authored
Merge pull request #126 from AdityaTeltia/feature/fooBar
Pre Loader Added
2 parents 3a706f6 + 02da716 commit 6e36d9a

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

assets/css/style.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ body {
22
background: #fff;
33
color: #444;
44
font-family: "Open Sans", sans-serif;
5+
overflow: hidden;
6+
}
7+
#loading{
8+
position: absolute;
9+
width: 100%;
10+
height: 100vh;
11+
z-index: 100;
12+
display: grid;
13+
align-items: center;
14+
justify-content: center;
15+
background-color: white;
516
}
617

718
a {
@@ -147,15 +158,14 @@ h6 {
147158
#header {
148159
height: 110px;
149160
transition: all 0.5s;
150-
z-index: 997;
161+
z-index: 1;
151162
transition: all 0.5s;
152163
padding: 20px 0;
153164
position: fixed;
154165
left: 0;
155166
top: 0;
156167
right: 0;
157168
transition: all 0.5s;
158-
z-index: 997;
159169
}
160170

161171
#header.header-scrolled,

assets/img/preloader Gif.gif

16 KB
Loading

assets/js/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
* License: https://bootstrapmade.com/license/
66
*/
77

8+
jQuery(document).ready(function() {
9+
jQuery('#loading').fadeOut(2000);
10+
setTimeout(() => {
11+
document.querySelector('body').style.overflow = "visible";
12+
}, 1900);
13+
});
14+
815
(function ($) {
916
"use strict";
1017

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
</head>
5151

5252
<body>
53+
<div id = "loading"><img src="./assets/img/preloader Gif.gif" alt="LOADING..."></div>
5354

5455
<!-- ======= Header ======= -->
5556
<header id="header">

0 commit comments

Comments
 (0)