JSFiddle - React, Tailwind, and code Playground
by alsadi
HTML
<div>
<div class="gear ani_rot_scale"></div>
<div style="clear:both"></div>
</div>
CSS
.gear {
background: url('https://lh3.googleusercontent.com/-MmqrVe7zIA8/Twb5xztRb9I/AAAAAAAAACc/jSwFcLj9ois/s128-c-k/gear.png');
width:128px;
height:128px;
position:absolute;
}
.ani_rot_scale {
-webkit-animation-name: ani;
-moz-animation-name: ani;
-webkit-animation-duration: 4s;
-moz-animation-duration: 4s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
animation-direction: normal;
-webkit-animation-direction: normal;
-moz-animation-direction: normal;
animation-timing-function: linear;
-webkit-animation-timing-function: linear;
-moz-animation-timing-function: linear;
}
@-moz-keyframes ani {
0% { -moz-transform:rotate(0) scale(1);}
50% { -moz-transform:rotate(180deg) scale(0.5); }
100% { -moz-transform:rotate(360deg) scale(1); }
}
@-webkit-keyframes ani {
0% { -webkit-transform:rotate(0) scale(1);}
50% { -webkit-transform:rotate(180deg) scale(0.5); }
100% { -webkit-transform:rotate(360deg) scale(1); }
}