JSFiddle - React, Tailwind, and code Playground
by deveedutta
HTML
<div class="gear cw"></div>
<div class="gear ccw"></div>
<!-- inspired by http://cssdeck.com/labs/rotating-gear-using-css3 and the facebook puzzle -->
CSS
@-webkit-keyframes gear-cw {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
}
}
@-webkit-keyframes gear-ccw {
0% {
-webkit-transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-360deg);
}
}
.gear {
background: url('http://www.bluebuckle.com/assets/images/IntenetAndEmailMarketing/icon-48x48-gear.png') no-repeat 0 0;
height: 48px;
width: 48px;
margin: 50px auto;
-webkit-animation-timing-function: linear;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: normal;
-webkit-animation-delay: 0;
-webkit-animation-play-state: running;
-webkit-animation-fill-mode: forwards;
-webkit-animation-duration: 5s;
}
.cw {
-webkit-animation-name: gear-cw;
}
.ccw {
-webkit-animation-name: gear-ccw;
}