Z
Z
zds2014-11-07 01:12:55
Design
zds, 2014-11-07 01:12:55

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

4 answer(s)
A
Anton Shamanov, 2014-11-07
@SilenceOfWinter

js script tracks the position of the cursor, I haven’t seen any universal libraries, but the implementation there is quite simple.

A
aen, 2014-11-07
@aen

scrollrevealjs.org

E
Elena, 2014-11-07
@Nidora

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>

And then bind the desired pictures to a specific area.

M
mrbaskus, 2017-01-07
@mrbaskus

this is parallax effect
full set here https://github.com/stephband/jparallax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question