Home >Web Front-end >CSS Tutorial >How to set the shape of the mouse with css

How to set the shape of the mouse with css

王林
王林Original
2020-11-12 11:35:252978browse

How to set the shape of the mouse in css: You can use the cursor attribute to set it, such as [span.crosshair {cursor:crosshair;}]. The cursor attribute specifies the type of cursor to be displayed. By default, the cursor is an arrow.

How to set the shape of the mouse with css

The cursor property specifies the type (shape) of the cursor to be displayed.

This attribute defines the cursor shape used when the mouse pointer is placed within the bounds of an element (however, CSS2.1 does not define which bounds determine this range).

(Learning video sharing: css video tutorial)

Default value: auto

Inheritance: yes

Version: CSS2

JavaScript syntax: object.style.cursor="crosshair"

Possible values:

default Default cursor (usually an arrow)

auto default. The cursor set by the browser.

crosshair The cursor appears as a crosshair.

pointer The cursor appears as a pointer (a hand) indicating a link.

move This cursor indicates that an object can be moved.

Example:

span.crosshair {cursor:crosshair;}
span.help {cursor:help;}
span.wait {cursor:wait;}

Related recommendations: CSS tutorial

The above is the detailed content of How to set the shape of the mouse with css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more