On
<div class="square"> <span class="l1"></span> <span class="l2"></span> <span class="l3"></span> <span class="l4"></span> </div>
/* #1st by: Joel Rodelo > edit by: webbeloz ** -webkit & Firefox ( lab ) */ .square { background: #002b36; display: block; width: 200px; height: 200px; position: absolute; top: 50%; left: 50%; margin: -110px auto auto -110px; overflow: hidden; border: 10px solid #eee; border-radius:3px; } .l1,.l2,.l3,.l4 { position: absolute; background: transparent; width: 0px; height: 0px; -webkit-animation-duration: .4s; -webkit-animation-iteration-count:1; -webkit-animation-timing-function: ease-in-out; -webkit-animation-fill-mode: forwards; animation-duration: .4s; animation-iteration-count:1; animation-timing-function: ease-in-out; animation-fill-mode: forwards; } .l1 { left: 0; bottom: 0; height: 200px; width: 5px; -webkit-animation-name: l1; -webkit-animation-delay: 0s; animation-name: l1; animation-delay: 0s; } .l2 { top: 0; left: 0; width: 200px; height: 5px; -webkit-animation-name: l2; -webkit-animation-delay: .4s; animation-name: l2; animation-delay: .4s; } .l3 { right: 0; top: 0; height: 200px; width: 5px; -webkit-animation-name: l3; -webkit-animation-delay: .8s; animation-name: l3; animation-delay: .8s; } .l4 { bottom: 0; right: 0; width: 200px; height: 5px; -webkit-animation-name: l4; -webkit-animation-delay: 1.2s; animation-name: l4; animation-delay: 1.2s; } @-webkit-keyframes l1 { 0% { height: 0; background: orange; } 100% { height: 200px; background: orange; } } @-webkit-keyframes l2 { 0% { width: 0; background: orange; } 100% { width: 200px; background: orange; } } @-webkit-keyframes l3 { 0% { height: 0; background: orange; } 100% { height: 200px; background: orange; } } @-webkit-keyframes l4 { 0% { width: 0; background: orange; } 100% { width: 200px; background: orange; } } @-webkit-keyframes l4 { 0% { width: 0; background: orange; } 100% { width: 200px; background: orange; } } @keyframes l1 { 0% { height: 0; background: orange; } 100% { height: 200px; background: orange; } } @keyframes l2 { 0% { width: 0; background: orange; } 100% { width: 200px; background: orange; } } @keyframes l3 { 0% { height: 0; background: orange; } 100% { height: 200px; background: orange; } } @keyframes l4 { 0% { width: 0; background: orange; } 100% { width: 200px; background: orange; } } @keyframes l4 { 0% { width: 0; background: orange; } 100% { width: 200px; background: orange; } }