+ 4
Is there a way to make something (ex: an image ) follow the cursor?
No description.
11 ответов
+ 5
Mouseover event
+ 6
⚡Prometheus ⚡ event can detect mouse location
+ 5
I never used that even , and I don't really know how it works.😅
+ 5
Use your pc mouse to test
https://code.sololearn.com/Wzt82sKdd3aR/?ref=app
+ 5
Calviղ Also mention that for mobile users just simply touch the screen at that place.
+ 4
Calviղ How does the mouseover event do it? Is there any sort of property binding equivalent in JavaScript? (Inspired by JavaFX btw)
+ 4
What is " evt.clientX-32"?
+ 4
Calviղ so , the image is 64px width , and to align it at the center of the cursor , you made half of it.(32px).
+ 2
🌲 Alex Tusinean 🔥 you're right 😊
+ 1
🌲 Alex Tusinean 🔥Current mouse position x - 32px (half length of img)
+ 1
⚡Prometheus ⚡ you can add touchmove event for mobile touch.