Home >Web Front-end >CSS Tutorial >How to hide the cursor in css
In CSS, you can use the cursor attribute to hide the cursor. The function of this attribute is to set the display type of the cursor. When the value of the attribute is "none", the cursor will be hidden and not displayed. The syntax is " Element {cursor:none;}".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
How to hide the cursor in css
In css, you can use the cursor attribute to hide the cursor. The function of the cursor attribute is to determine the cursor to be displayed. type (shape). This property defines the cursor shape used when the mouse pointer is placed within the bounds of an element.
When the attribute value is none, the cursor will be hidden and not displayed.
The example is as follows:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> div{ width:200px; height:200px; border:1px solid #000; cursor:none; } </style> </head> <body> <div></div> </body> </html>
Output result:
If you are interested, you can continue to visit:css video tutorial.
The above is the detailed content of How to hide the cursor in css. For more information, please follow other related articles on the PHP Chinese website!