2

I am trying to create a custom cursor image on my <body> tag .It's not working and Mozilla showing invalid property value . But I can't fix this please check my css :

body {
height : 100%;
box-sizing : border-box;
background : transparent;
margin : 0;
padding : 0;
cursor: url(icons/cursoricon.png), auto;
}

A screenshot here

Thank You !

4
  • Does it work? See W3schools have the same "problem". Commented Aug 28, 2017 at 5:38
  • here it is working I checked it . Commented Aug 28, 2017 at 5:40
  • try to change your second argument from auto to pointer, and also try to resize your image. I think max size for cursor should be something around 32x32px Commented Aug 28, 2017 at 6:43
  • Thank you JavaEvgen the problem was the image size . Commented Aug 28, 2017 at 7:08

1 Answer 1

1

Have you seen this question and answer? It seems like changing to the following code may fix your problem, according to the Mozilla guide.

cursor: url(icons/cursoricon.png) 2 2, auto;

*Where 2 is optional X and Y coordinates. Not sure why it fixed this person's problem, as it seems the parameters are optional, but worth trying.

Sign up to request clarification or add additional context in comments.

3 Comments

Hello I checked this and try also but not working check this image link
Can you try it in other browsers like Chrome and see what happens? If that doesn't work, can you clarify that your URL is added correctly? Check this guide out and try replacing your current url with url(images.vexels.com/media/users/3/131776/isolated/lists/…) or any other online image to see if your path is correct. Maybe url(./icons/cursoricon.png)? developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/…
Thank You for your suggestions but it still not working . It's working on W3C but how ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.