Crazy Loader...

In this example below you will see how to do a Crazy Loader... with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by alBz, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright alBz ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Crazy Loader...</title>
  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="loader"></div>

<div class="container">
<h1>Hello World</h1>
<p>element1</p>
<p>element2</p>
<p>element3</p>
</div>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/alBz/crazy-loader-YqrdPL */
#loader {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: white;
  background-image: url("http://associazioneamicomio.it/ripple.svg");
  background-repeat: no-repeat;
  background-position: center center;
}

.container {
  position: relative;
  text-align: center;
  position: relative;
  top: 50%;
  -webkit-transform: translateY(50%);
          transform: translateY(50%);
  opacity: 0;
}

.viewPage {
  opacity: 1;
}


/*Downloaded from https://www.codeseek.co/alBz/crazy-loader-YqrdPL */
$(document).ready(function(){
  
  function testingGif() {
    
    let animationFadeOut = $('#loader');
    
    animationFadeOut.fadeOut('slow', function(){
      console.log('done');
    })
    
  }
  
  function viewPage() {
    $('.container').addClass('viewPage');
  }
  
  setTimeout(testingGif,1600);
  setTimeout(viewPage,1700);
 
})

Comments