Reputation: 115
If i set a GIF image as Hover effect on an anchor, it will still remain animating even if not showed (not set as a background) so this causes that the animation starts in the middle of itself for example but this kills the nice effects its used for..
any suggestions?
thanks in advance
Upvotes: 1
Views: 1432
Reputation: 3491
You can't control animation of gif images in html. but work around of this can be is you replace the gif image with the static image on mouseover or with other event using jquery or javascript. Only by CSS it is not possible. Example:
$("#imageGif").hover(
function() {
$(this).attr("src", "/image.gif");
},
function() {
$(this).attr("src", "/image.png");
});
Upvotes: 1