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

王林
Release: 2020-11-12 11:35:25
Original
2946 people have browsed it

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;}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template