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
  • 892
  • 2
  • 10
  • 24

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,295
  • 17
  • 27
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
  • 5,744
  • 3
  • 25
  • 52