1

My aim: To change the default click pointer on a website using CSS.

I have already changed the default pointer but this question is specifically for changing different 'versions' of the cursor.

My current attempt for the pointer is:

cursor: url(images/click.png), pointer;

This worked for the default mouse change (pointer was renamed as auto) but I've yet to find a working solution for the pointer.

Is it plausible or is it simply something not needed and thus, not introduced?

2 Answers 2

4

Just set cursor style.

 
 a {
        cursor: url("/examples/images/custom.gif"), url("/examples/images/custom.cur"), default;
   }
 
Sign up to request clarification or add additional context in comments.

Comments

1

You can read about the css hover property. and add the cursor to it. For example putting the following code in your styles would make the cursor alias whenever you'd hover over the anchor tag. Let me know if this helps you.

a:hover {
  cursor: alias
}

3 Comments

Yes, that would beto change the default cursor for the website. I'm looking to only change the style on the pointer. (E.G when you go to click an element that cursor is styled differently)
@GhastlyCode You can make use of hover for that. Example if you have an anchor tag and you'd want to change the styling for it when the user hover over it you'd do this in your styles. a:hover { background-color: yellow; } But this would change it for all the anchor tag so use some class or id if you want to restrict the impact. Hope this helps. You can also read about css hover property.
Yep you're right the worst part is it's something I had done before! Apologies, I'm clearly having an off day. Thank you very much for the clarification though, I'll accept your answer :)

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.