HTML Snippet <div class=”loader”> <div class=”rect red”> </div> <div class=”rect blue”> </div> <div class=”rect orange”> </div> <div class=”rect green”> </div> </div> CSS Snippet .loader { position: relative; width: 40px; height: 40px; animation: loadrotate 4s linear infinite } .rect { width: 20px; height: 20px; float: left; animation: rotation 3s infinite } .red { background: red }