<div></div>
<h1>Sweet CSS loader</h1>
/* Rotation */
@keyframes rotate {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}

/* Square */
div, 
div:before,
div:after {
  width: 4em;
  height: 4em;
  content: "";
  background-color: #00D9A3; 
}

/* Position */
div {
  margin: 4em auto;
  position: relative;
}

/* Animate */
div {
  animation: rotate 2.5s infinite linear;
}

/* Position */
div:before,
div:after {
  position: absolute;
  left: 0;
  top: 0;
}

/* Star shape */
div:before {
   transform: rotate(60deg);
}
div:after {
   transform: rotate(-60deg);
}

/* Just decoration */
h1 {
  text-align: center;
  font-family: 'Kavoon', sans-serif;
  font-size: 2.5em;
  color: #00D9A3;
}
body {
  background: #DEFCF5;
}
Run Pen

External CSS

  1. https://fonts.googleapis.com/css?family=Kavoon

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js