Home>Article>Web Front-end> How to achieve mouse hiding effect in css3
In CSS, you can use the cursor attribute to achieve the mouse hiding effect. This attribute is used to define the cursor shape used when the mouse pointer is placed within the boundary of an element. When the attribute value is set to none, this can be achieved. Mouse hiding effect, the syntax is "element {cursor:none}".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
The cursor attribute defines the cursor shape used when the mouse pointer is placed within the boundary of an element
Common mouse styles are as follows:
urlThe URL of the custom cursor to be used. Note: Always define a normal cursor at the end of this list in case there is no cursor defined by URL available.
default Default cursor (usually an arrow)
auto Default. The cursor set by the browser.
crosshair The cursor is rendered as crosshairs.
pointer The cursor appears as a pointer (a hand) indicating a link
move This cursor indicates that an object can be moved.
e-resize This cursor indicates that the edge of the rectangular box can be moved to the right (east).
ne-resize This cursor indicates that the edge of the rectangular box can be moved up and to the right (North/East).
The example is as follows:
123 请把鼠标移动到元素上,可以看到鼠标指针发生变化:
Output result:
(Learning video sharing:css video Tutorial)
The above is the detailed content of How to achieve mouse hiding effect in css3. For more information, please follow other related articles on the PHP Chinese website!