Home  >  Article  >  Web Front-end  >  How to remove the mouse style of a tag in css

How to remove the mouse style of a tag in css

WBOY
WBOYOriginal
2022-04-20 11:07:002961browse

In CSS, the cursor attribute can be used to remove the mouse style of the a tag. This attribute is used to define the mouse style used by the mouse pointer within the boundary of an element. When the attribute value is set to none, the mouse style of the element will be removed. Style, when set to default, displays the default arrow style, the syntax is "a{cursor:none}".

How to remove the mouse style of a tag in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to remove the mouse style of a tag in css

The cursor attribute defines the cursor shape used when the mouse pointer is placed within the bounds of an element

  • default Default cursor (usually an arrow)

  • auto Default. The cursor set by the browser.

The example is as follows:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>123</title> 
<style>
.a2{cursor:none}
.a3{cursor:default}
.a4{cursor:crosshair}
.a5{cursor:pointer}
</style>
</head>
<body>
<a href="#" class="a1">鼠标样式</a><br>
<a href="#" class="a2">鼠标样式没有</a><br>
<a href="#" class="a3">鼠标样式正常</a><br>
<a href="#" class="a4">鼠标样式为十字线</a><br>
<a href="#" class="a5">鼠标样式为指示链接的指针</a>
</body>
</html>

Output result:

How to remove the mouse style of a tag in css

(Learning video sharing: css video Tutorial)

The above is the detailed content of How to remove the mouse style of a tag in 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