Menu Close

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

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.

Posted in CSS