Home > Web Front-end > CSS Tutorial > How to hide the cursor in css

How to hide the cursor in css

WBOY
Release: 2021-12-10 09:21:06
Original
4766 people have browsed it

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;}".

How to hide the cursor in css

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

Output result:

How to hide the cursor in css

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!

Related labels:
css
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