Simple Boxes Loader

HTML
<div class="wrap"> <div class="box1"></div> <div class="box2"></div> <div class="box3"></div> </div>
CSS
html, body { height: 100%; width: 100%; background: linear-gradient(to left, #ff7e5f , #feb47b); } .wrap { position: absolute; top: 50%; left: 50%; margin-right: -50%; transform: translate(-50%, -50%); } .box1, .box2, .box3 { display: inline-block; margin: 5px; height: 20px; width: 20px; background: #fff; box-shadow: 2px 2px 0 0 #d35400; animation: loading, shadow; animation-duration: 2s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; } .box1 { animation-delay: 1s; } .box2 { animation-delay: 1.3s; } .box3 { animation-delay: 1.6s; } @keyframes loading { 0%, 100% { position: relative; top: 0; left: 0; } 30% { left: -5px; top: -10px; } 55% { top: 0; left: 0; } } @keyframes shadow { 30% { box-shadow: 7px 12px 0 0 #d35400; } 55% { box-shadow: 2px 2px 0 0 #d35400; } }
JAVASCRIPT
Expand for more options Login