[英]javascript cursor image position
i change my cursor background to image file , the cursor in top of image 我将光标背景更改为图像文件,图像顶部的光标
$(".mainDiv").attr("style", "cursor: url(./images/myImage.png) ,auto");
How to set the cursor in bottom of image ? 如何将光标设置在图像底部?
使用.css()
代替:
$(".mainDiv").css({cursor: 'url(./images/myImage.png) ,auto'});
$(".mainDiv").css("cursor", "url('url') ,auto");
the answer is : 答案是 :
$(".mainDiv").attr("style", "cursor: url(./images/myImage.png) 70 120 ,auto");
70 120 , padding the cursor in image . 70120,将光标填充到图像中。 Max left is 70 , Max top is 120. 左侧最大为70,顶部最大为120。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.