'Using CSS to move elements opposite of Mouse

I want to achieve a CSS mouse effect where: -if the mouse hovers leftwards on the element, the element moves right. -if the mouse hovers rightwards on the element, the element moves left. -if the mouse hovers upwards on the element, the element moves down. -if the mouse hovers downwards on the element, the element moves up.

What CSS can help me achieve this?

Regards



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source