Hello
Today the modus operandi of a moving image rotation
Of course the image will spin when the mouse hovers
Add in the region of the Head the following code

Code:
 <style type="text/css">  img.rotate:hover   {transform: rotate(360deg);-moz-transform:   rotate(360deg);-webkit-transform: rotate(360deg);-o-transform:   rotate(360deg);-ms-transform:   rotate(360deg);-webkit-transition-duration:  1s;-moz-transition-duration:  1s;-o-transition-duration:  1s;-ms-transition-duration:  1s;transition-duration: 1s;  }</style>
And add this code in the Body and adjust necessary

PHP Code:
     <img src="Image Path" class="rotate" 
Source