
Apu
October 29, 2022 ›
#alt
›
#animation
❌
How to rotate images on hover using css
To rotate an image on hover , we can use the css transform property with its value rotate() function.
img:hover{ transform: rotate(180deg); }
We will add the css transition property to the image. So that the image rotates 180 degrees with a smooth transition.
Demo : rotate an image on hover #
<style>
img{
transition: all 300ms ease-in-out;
}
img:hover{
transform: rotate(180deg);
}
</style>
<img src="https://app.3schools.in/logo.png" id="logo">
Try it Yourself »
save
listen
AI Answer
How to rotate images on hover using css
0
To rotate an image on hover , we can use the css transform property with its value rotate…
asked
Apu
0 answers
2915
To rotate an image on hover , we can use the css transform property with its value rotate…
Answer Link
answered
Apu