Answer the question
In order to leave comments, you need to log in
How to make the content move behind the cursor?
I'm interested in a way to implement such dynamics on the site, when you move the mouse, and the picture or text smoothly moves in the direction of movement.
To make it clear what I'm talking about, please take a look at the site www.weltpixel.com/cleo
That's exactly what this effect is called, and by what means is it implemented?
Thank you.
Answer the question
In order to leave comments, you need to log in
js script tracks the position of the cursor, I haven’t seen any universal libraries, but the implementation there is quite simple.
Determine the coordinates of the mouse using the script, if I remember everything correctly, then this:
<b><some_element onMouseMove="some_element.onmousemove=func_name(e);">
<script language = "JavaScript">
<!--
function func_name (e) {
alert(e);
}
-->
</script></b>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question