Better animating this in css or js? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Better animating this in css or js?

Hello everyone, i have this png ( https://ibb.co/CQwdnx1 ) used as a background for a header, there's a character reflected in the mirror that i want to play an animation where the character glasses shines on hover. I was thinking about calling a gif of the character on hover via css, where the gif is contained in a flexbox that i would place in the rear-view mirror, but i think it would be tricky to render correctly without some kind of clipping. I have not started js for now, is that it i should use to do that correctly?

26th Feb 2019, 9:23 AM
Nathan Traub
Nathan Traub - avatar
2 Réponses
+ 2
You can use html5 canvas as background. It makes the work done efficiently.
27th Feb 2019, 9:35 PM
Parsa Gholipout
Parsa Gholipout - avatar
0
Thanks, it indeed helped me!
3rd Mar 2019, 10:45 AM
Nathan Traub
Nathan Traub - avatar