javascript光标图像位置
我将光标背景更改为图像文件,光标位于图像顶部javascript光标图像位置,javascript,html,css,cursor,Javascript,Html,Css,Cursor,我将光标背景更改为图像文件,光标位于图像顶部 $(".mainDiv").attr("style", "cursor: url(./images/myImage.png) ,auto"); 如何在图像底部设置光标?请改用: 答案是: $(".mainDiv").attr("style", "cursor: url(./images/myImage.png) 70 120 ,auto"); 70 120,在图像中填充光标。最大左侧为70,最大顶部为120。可以,但我需要将光标设置在底部,例如
$(".mainDiv").attr("style", "cursor: url(./images/myImage.png) ,auto");
如何在图像底部设置光标?请改用:
答案是:
$(".mainDiv").attr("style", "cursor: url(./images/myImage.png) 70 120 ,auto");
70 120,在图像中填充光标。最大左侧为70,最大顶部为120。可以,但我需要将光标设置在底部,例如,光标位置在图像的左上角,我可以将其设置在右下角吗?可以,但需要将光标设置在我图像的右下角,而不是左上角,我可以这样做吗?
$(".mainDiv").css("cursor", "url('url') ,auto");
$(".mainDiv").attr("style", "cursor: url(./images/myImage.png) 70 120 ,auto");