JSFiddle - React, Tailwind, and code Playground

by Billybobbonnet

HTML

<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
<div id="loader-container">
  <div id="preloader">
    <div id="loader">
    </div>
  </div>
  <div id="loader-text">Chargement<span class="loader-dot">.</span><span class="loader-dot">.</span><span class="loader-dot">.</span></div>
</div>

SCSS

body {
  background-color: white;
  font-family: 'Roboto Condensed', sans-serif;
}

$inspire-yellow: #fedd32;
#loader-container {
  #loader-text {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    vertical-align: middle;
    display: flex;
    align-items: center;
    justify-content: center;
    color: gray;
    font-size: 0.8rem;
    margin-left:9px;
    .loader-dot {
      animation: 1s blink infinite
    }
    .loader-dot:nth-child(2) {
      animation-delay: 250ms
    }
    .loader-dot:nth-child(3) {
      animation-delay: 500ms
    }
  }


#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  #loader {
    display: block;
    position: relative;
    left: 50%;
    top: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: lighten($inspire-yellow, 10%);
    -webkit-animation: spin 3s linear infinite;
    animation: spin 3s linear infinite;
  }
  #loader:before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: $inspire-yellow;
    -webkit-animation: spin 4.5s linear infinite;
    animation: spin 4.5s linear infinite;
  }
  #loader:after {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: darken($inspire-yellow, 10%);
    -webkit-animation: spin 2.25s linear infinite;
    animation: spin 2.25s linear infinite;
  }
}

}

@keyframes blink {
  50% {
    color: transparent
  }
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    transform:...