How To Create a Loader?

Example of how to center the loader page and display the page content while loading How To Create a Loader ests

HTML

<!DOCTYPE html>
<html>
<head>
<title>Loader</title>
     <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body onload="myFunction()">
       <div id="loading"></div>
</body>
</html>

Css

*{
padding: 0;
margin: 0;
}

#loading{
	position: fixed;
	width: 100%;
	height: 100vh;
	background: #fff
	url('circle-loader-gif-2.gif')
	 no-repeat center center;	
	z-index: 99999;
}

JavaScript

var preloader = document.getElementById("loading");


 
function myFunction(){
	preloader.style.display = 'none';
};


How To Create a Loader estsexpoundsofttechsolution


How To Create a Loader ests