JSFiddle - React, Tailwind, and code Playground
HTML
<div id="image">
<img src="http://www.clipartpal.com/_thumbs/pd/education/award_ribbon_blue_T.png">
</div>
CSS
/* || set up animation */
@-webkit-keyframes wind {
0% { -webkit-transform: rotate(-10deg); }
100% { -webkit-transform: rotate(10deg); }
}
@-moz-keyframes wind {
0% { -moz-transform: rotate(-10deg); }
100% { -moz-transform: rotate(10deg); }
}
@-ms-keyframes wind {
0% { -ms-transform: rotate(-10deg); }
100% { -ms-transform: rotate(10deg); }
}
@-o-keyframes wind {
0% { -o-transform: rotate(-10deg); }
100% { -o-transform: rotate(10deg); }
}
@keyframes wind {
0% { transform: rotate(-10deg); }
100% { transform: rotate(10deg); }
}
/* || other CSS */
#image {
position: absolute;
top: 10%;
left: 25%;
-webkit-animation-name: wind;
-moz-animation-name: wind;
-ms-animation-name: wind;
-o-animation-name: wind;
animation-name: wind;
-webkit-animation-duration: 3s;
-moz-animation-duration: 3s;
-ms-animation-duration: 3s;
-o-animation-duration: 3s;
animation-duration: 3s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-ms-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
-moz-animation-direction: alternate;
-ms-animation-direction: alternate;
-o-animation-direction: alternate;
animation-direction: alternate;
}