Sobes.tech
Intern

How to change the cursor on a web page?

sobes.tech AI

Answer from AI

The cursor property in CSS.

Predefined values can be used:

  • auto: The cursor is determined by the context.
  • default: The default arrow.
  • pointer: The hand cursor (like a link).
  • text: The I-beam cursor (for text).
  • wait: The waiting indicator.
  • help: The question mark cursor.
.element {
  cursor: pointer; /* Hand cursor */
}

Custom images can also be used:

.element {
  cursor: url('path/to/image.cur'), auto; /* Custom cursor with fallback to auto */
}

It is recommended to use .cur or .svg formats for images, and to specify a fallback predefined value.