Positioning the css cursor url

I have css like this:

cursor: url("x.gif"), move;

but the problem is that the image is not positioned correctly, I would like to move it -15px up and, for example, leave it. Is it possible?

Center a cursor: move; is an afaict click point, and I would also like to use the center of my custom cursor image.

+7
source share
1 answer

Yes - just specify the coordinates of the access point:

 cursor: url("x.gif") 15 15, move; 

However, keep in mind that this will break some browsers. Ideally, you need:

 cursor: url("x.cur"), move; cursor: url("x.gif") 15 15, move; 

Where x.cur is the "correct" cursor file. If you need a program to create it, try the RealWorld cursor editor.

+16
source

All Articles