I have one png image and another gif image. And the gif image is made from photoshop with setting for once.
Now when I hover the button then background-image
is changed with the gif image but if again hovered then it will change the background image to gif file but not animating.
Is there any solution for this?
2
Answers
Displaying a .gif on hover isn’t really the best way to go about this, due to compatibility with other browsers. Maybe you could consider using CSS animations? Here’s a cool library made up of some CSS keyframe animations.
http://daneden.github.io/animate.css/
The flipOutX animation might be a close match to what you want.
JsFiddle
Think this is what you wanted:
HTML:
CSS: