Afshin
Afshin

Reputation: 4215

Customize mouse pointer with css or jquery

I want change div mouse pointer icon when div:hover active with my own png icon. how can I do that with css ,jquery, javasript ?

Upvotes: 0

Views: 485

Answers (1)

Denys Séguret
Denys Séguret

Reputation: 382404

Using CSS :

#yourDivId:hover {
   cursor:url('yourPath.png'), crosshair;
}

Note that it's better to provide a fallback (separate values with commas). Here crosshair will be used if yourPath.png can't be used.

Upvotes: 1

Related Questions