How can I change the mouse pointer icon on a web page?

Is there a way to change the mouse pointer icon using javascript (or any other method) when I attach it to plain text on which I want it to appear like a hand, like with links on a web page.

+4
source share
3 answers

See http://www.w3schools.com/cssref/pr_class_cursor.asp

Using css:

div {cursor: pointer; }

+4
source

See the css cursor attribute.

This is the best way to do this.

+1
source

You can use as:

onmouseover="this.style.cursor = 'hand';" //on mouse over onmouseout="this.style.cursor = 'auto';" // on mouse out 
+1
source

Source: https://habr.com/ru/post/1397257/


All Articles