How to do animation using hover tag in CSS? | SoloLearn: Learn to code for FREE!

+15

How to do animation using hover tag in CSS?

5/19/2020 12:18:42 PM

YASH SHAH

4 Answers

New Answer

+9

Please give me 1 upvote

+5

<style> #move{ width:200px; background-color:blue; height:200px; top:10px; left:10px; position:absolute; } #move:hover{ animation:moving_square 2s infinite; } @keyframes moving_square{ 50%{ top:100px; } 100%{ left:100px; } } </style> </head> <body> <div id="move"></div>

+4

you have to write <style> in Html

+3

Uh what?You are here to learn ,and also seems like you didn't wanted a solution as you can't even say a thank you ,weird!