Alter opacity of layer based on mouse cursor position

Hi all!

I have just started using Wix, and I am searching for a way of creating a background for a website that contains two layers:

One background static layer, and a layer that changes its alpha/opacity based on the position of the mouse cursor.

Is this possible using Velo? :slight_smile:

I hope the question makes sense.

Best regards, Johan

Or, the first task, I believe, is to create a function returning the coordinates of the mouse.

I have tried some guides including Tracking Mouse Move with Velo Code | Velo by Wix
But I can’t make them work when importing into my own editor.

Do you know if there is a way to create a plain section with a text only containing the x,y values of the cursor? I have found React to be a useful tool as well.

Many thanks, Johan