Categories
CSS

How to change the cursor into a hand when a user hovers over a list item with CSS?

Spread the love

Sometimes, we want to change the cursor into a hand when a user hovers over a list item with CSS.

In this article, we’ll look at how to change the cursor into a hand when a user hovers over a list item with CSS.

How to change the cursor into a hand when a user hovers over a list item with CSS?

To change the cursor into a hand when a user hovers over a list item with CSS, we set the cursor property.

For instance, we write

li {
  cursor: pointer;
}

to add the cursor: pointer style to make the cursor turn into a hand when we hover over li elements.

Conclusion

To change the cursor into a hand when a user hovers over a list item with CSS, we set the cursor property.

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 *