Categories
CSS

How to change the mouse cursor on mouse over to anchor-like style with CSS?

Spread the love

Sometimes, we want to change the mouse cursor on mouse over to anchor-like style with CSS.

In this article, we’ll look at how to change the mouse cursor on mouse over to anchor-like style with CSS.

How to change the mouse cursor on mouse over to anchor-like style with CSS?

To change the mouse cursor on mouse over to anchor-like style with CSS, we set the cursor style to pointer.

For instance, we write

#myDiv {
  cursor: pointer;
}

to set the cursor style of the element with ID myDiv to pointer so that when we move our mouse into the element, the pointer will show the hand icon that’s displayed for links by default.

Conclusion

To change the mouse cursor on mouse over to anchor-like style with CSS, we set the cursor style to pointer.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *