Object Moves On Mouse Hover

I am a beginner web designer and developer, and i want to design a banner made up of small squares. When the mouse hovers on one of those squares, they all scatter and move out of the screen.

How can i do this using html?

Thank you.


You can do this with CSS animation, which is great thing to learn as a designer. Depending on the complexity of your request, you may need javascript as well.


1 Like

Welcome to the forums! CSS animations would be your best bet as @kvapster mentioned :slight_smile:

This article can get you started on them: https://www.kirupa.com/html5/introduction_css_animations.htm

animation link is very helpfull