0

I have an image follow my mouse cursor (image is set to be directly beneath the cursor). All is well except now I cant really click on anything, because when i click, im just selecting the image and not the elements under it. Is there anyway to ignore the image when it comes to mouse events like click or mousedown?

I dont want to use a custom cursor (cursor: url(...)). Just need the mouse events to propagate to the elements under the image.

Edit:

adding pointer-events: none; sorta works, but disables cursor: none.

Nu Gnoj Mik
  • 994
  • 3
  • 10
  • 25

2 Answers2

3

Using CSS for the image, you can make clicks pass through it by adding pointer-events: none;.

See Click through a DIV to underlying elements

Community
  • 1
  • 1
Blubberguy22
  • 1,344
  • 1
  • 17
  • 29
0

You can create a fixed html div that follows the mousecursor using javascript. This way you are not limited to only images but also content.

Titulum
  • 9,928
  • 11
  • 41
  • 79