0

JSFiddle

On hover I wish to scale anything in the a tag, including an image.

I use:

a:hover{
    transform: scale(1.05);
}

And this works, but then when the animation ends, the image snaps back to it's original size. I need it to stay large until the hover goes out.

Please note I cannot apply the animation to the image itself because I also need to animate whatever is inside the a tag.

panthro
  • 22,779
  • 66
  • 183
  • 324
  • I have closed it as a dupe because even though the actual transforms are different, the root cause is the same. – Harry Aug 28 '15 at 09:34

1 Answers1

4

Adding display:inline-block to your <a> tag seems to fix this.

JSFIDDLE

zgood
  • 12,181
  • 2
  • 25
  • 26