I want to find out how to make a spinning or rotating image when it is hovered. I would like to know how to emulate that functionality with CSS on the following code :
img {
border-radius: 50%;
}
<img src="http://i.imgur.com/3DWAbmN.jpg" />
You can use CSS3 transitions with rotate()
to spin the image on hover.
img {
transition: transform .7s ease-in-out;
}
img:hover {
transform: rotate(360deg);
}
<img src="https://i.sstatic.net/BLkKe.jpg" width="100" height="100"/>
Here is a fiddle DEMO
More info and references :