File tree Expand file tree Collapse file tree 3 files changed +34
-10
lines changed Expand file tree Collapse file tree 3 files changed +34
-10
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,27 @@ body {
1111}
1212/*---------------- Own Carousel----------- */
1313# loading {
14- position : absolute;
15- width : 100% ;
16- height : 100vh ;
17- z-index : 100 ;
18- display : grid;
19- align-items : center;
20- justify-content : center;
21- background-color : white;
14+ position : fixed;
15+ top : 0 ;
16+ left : 0 ;
17+ right : 0 ;
18+ bottom : 0 ;
19+ background-color : # FFF ; /* change if the mask should have another color then white */
20+ z-index : 99999 ; /* makes sure it stays on top */
21+ }
22+ # status {
23+ width : 100px ;
24+ height : 100px ;
25+ position : absolute;
26+ left : 50% ; /* centers the loading animation horizontally one the screen */
27+ top : 50% ; /* centers the loading animation vertically one the screen */
28+ background-image : url ("../imgs/loader.gif" );
29+ z-index : 9999 ; /* path to your loading animation */
30+ background-repeat : no-repeat;
31+ background-position : center;
32+ background-size : cover;
33+ margin : -50px 0 0 -50px ; /* is width and height divided by two */
2234}
23-
2435a {
2536 color : # 1bb1dc ;
2637 transition : 0.5s ;
Original file line number Diff line number Diff line change 5050</ head >
5151
5252< body >
53- < div id = "loading "> < img src ="./assets/img/preloader Gif.gif " alt ="LOADING... "> </ div >
53+
54+ < div id ="preloader ">
55+ < div id ="status ">
56+ < img src ="./assets/img/preloader.gif " alt ="LOADING... ">
57+ </ div >
58+ </ div >
5459
5560 <!-- ======= Header ======= -->
5661 < header id ="header ">
@@ -888,6 +893,14 @@ <h4>Contact Us</h4>
888893 <!-- news letter js -->
889894 < script src ="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js "> </ script >
890895 < script src ="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js "> </ script >
896+ < script src ="https://code.jquery.com/jquery-1.12.4.min.js " type ="text/javascript "> </ script >
897+ < script type ="text/javascript ">
898+ $ ( window ) . load ( function ( ) { // makes sure the whole site is loaded
899+ $ ( '#status' ) . fadeOut ( ) ; // will first fade out the loading animation
900+ $ ( '#preloader' ) . delay ( 50 ) . fadeOut ( 100 ) ; // will fade out the white DIV that covers the website.
901+ $ ( 'body' ) . delay ( 50 ) . css ( { 'overflow' :'visible' } ) ;
902+ } )
903+ </ script >
891904
892905</ body >
893906
You can’t perform that action at this time.
0 commit comments