Having recently started learning HTML & CSS, I have a question regarding creating a box that scales from 1.0
to 0.8
when hovered over with the mouse.
The scaling works perfectly when hovering in the middle (0.0
to 0.8
) of the box.
However, when hovering between the 0.8
and 1.0
areas, it behaves erratically whenever I move my mouse.
I want the box to scale to 0.8
when hovering anywhere within the 1.0
area at any point in time. It should return to its original size of 1.0
upon exiting the specific 1.0
region, not any other part. I'm struggling to figure this out on my own.
Test it or see it: https://jsfiddle.net/cyLxLbya/
YouTube Video: https://youtu.be/4MT4hrK7DVE (left is between 0-0.8, right goes crazy between 0.8-1)