Search code examples
javascripthtmlcsscursor

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 ?


Solution

  • the answer is :

    $(".mainDiv").attr("style", "cursor: url(./images/myImage.png)  70 120 ,auto");
    

    70 120 , padding the cursor in image . Max left is 70 , Max top is 120.