Usage
HTML
<div class="la-ball-zig-zag-deflect">
<div></div>
<div></div>
</div>
CSS
/*!
* Load Awesome v1.1.0 (http://github.danielcardoso.net/load-awesome/)
* Copyright 2015 Daniel Cardoso <@DanielCardoso>
* Licensed under MIT
*/
.la-ball-zig-zag-deflect,
.la-ball-zig-zag-deflect > div {
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.la-ball-zig-zag-deflect {
display: block;
font-size: 0;
color: #fff;
}
.la-ball-zig-zag-deflect.la-dark {
color: #333;
}
.la-ball-zig-zag-deflect > div {
display: inline-block;
float: none;
background-color: currentColor;
border: 0 solid currentColor;
}
.la-ball-zig-zag-deflect {
position: relative;
width: 32px;
height: 32px;
}
.la-ball-zig-zag-deflect > div {
position: absolute;
top: 50%;
left: 50%;
width: 10px;
height: 10px;
margin-top: -5px;
margin-left: -5px;
border-radius: 100%;
}
.la-ball-zig-zag-deflect > div:first-child {
-webkit-animation: ball-zig-deflect 1.5s 0s infinite linear;
-moz-animation: ball-zig-deflect 1.5s 0s infinite linear;
-o-animation: ball-zig-deflect 1.5s 0s infinite linear;
animation: ball-zig-deflect 1.5s 0s infinite linear;
}
.la-ball-zig-zag-deflect > div:last-child {
-webkit-animation: ball-zag-deflect 1.5s 0s infinite linear;
-moz-animation: ball-zag-deflect 1.5s 0s infinite linear;
-o-animation: ball-zag-deflect 1.5s 0s infinite linear;
animation: ball-zag-deflect 1.5s 0s infinite linear;
}
.la-ball-zig-zag-deflect.la-sm {
width: 16px;
height: 16px;
}
.la-ball-zig-zag-deflect.la-sm > div {
width: 4px;
height: 4px;
margin-top: -2px;
margin-left: -2px;
}
.la-ball-zig-zag-deflect.la-2x {
width: 64px;
height: 64px;
}
.la-ball-zig-zag-deflect.la-2x > div {
width: 20px;
height: 20px;
margin-top: -10px;
margin-left: -10px;
}
.la-ball-zig-zag-deflect.la-3x {
width: 96px;
height: 96px;
}
.la-ball-zig-zag-deflect.la-3x > div {
width: 30px;
height: 30px;
margin-top: -15px;
margin-left: -15px;
}
/*
* Animations
*/
@-webkit-keyframes ball-zig-deflect {
17% {
-webkit-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
34% {
-webkit-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
50% {
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-webkit-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
84% {
-webkit-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
100% {
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@-moz-keyframes ball-zig-deflect {
17% {
-moz-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
34% {
-moz-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
50% {
-moz-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-moz-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
84% {
-moz-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
100% {
-moz-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@-o-keyframes ball-zig-deflect {
17% {
-o-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
34% {
-o-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
50% {
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-o-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
84% {
-o-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
100% {
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@keyframes ball-zig-deflect {
17% {
-webkit-transform: translate(-80%, -160%);
-moz-transform: translate(-80%, -160%);
-o-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
34% {
-webkit-transform: translate(80%, -160%);
-moz-transform: translate(80%, -160%);
-o-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
50% {
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-webkit-transform: translate(80%, -160%);
-moz-transform: translate(80%, -160%);
-o-transform: translate(80%, -160%);
transform: translate(80%, -160%);
}
84% {
-webkit-transform: translate(-80%, -160%);
-moz-transform: translate(-80%, -160%);
-o-transform: translate(-80%, -160%);
transform: translate(-80%, -160%);
}
100% {
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@-webkit-keyframes ball-zag-deflect {
17% {
-webkit-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
34% {
-webkit-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
50% {
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-webkit-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
84% {
-webkit-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
100% {
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@-moz-keyframes ball-zag-deflect {
17% {
-moz-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
34% {
-moz-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
50% {
-moz-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-moz-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
84% {
-moz-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
100% {
-moz-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@-o-keyframes ball-zag-deflect {
17% {
-o-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
34% {
-o-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
50% {
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-o-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
84% {
-o-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
100% {
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
}
@keyframes ball-zag-deflect {
17% {
-webkit-transform: translate(80%, 160%);
-moz-transform: translate(80%, 160%);
-o-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
34% {
-webkit-transform: translate(-80%, 160%);
-moz-transform: translate(-80%, 160%);
-o-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
50% {
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
67% {
-webkit-transform: translate(-80%, 160%);
-moz-transform: translate(-80%, 160%);
-o-transform: translate(-80%, 160%);
transform: translate(-80%, 160%);
}
84% {
-webkit-transform: translate(80%, 160%);
-moz-transform: translate(80%, 160%);
-o-transform: translate(80%, 160%);
transform: translate(80%, 160%);
}
100% {
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
}