Home >Web Front-end >Front-end Q&A >How to prohibit clicks on html a

How to prohibit clicks on html a

藏色散人
藏色散人Original
2021-05-26 11:11:057012browse

html How to disable clicks on a: First create an HTML sample file; then enter an a tag; finally add the attribute "pointer-events:none;" to the a tag to disable clicks.

How to prohibit clicks on html a

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, DELL G3 computer

HTML a tag click prohibited:

in The style of a tag is added with the following attributes

<a style="pointer-events: none;"/>

pointer-events Introduction: The

pointer-events attribute defines whether the element reacts to pointer events.

Syntax

pointer-events: auto|none;

Attribute value

auto Default value. Elements react to pointer events, such as :hover and click.

none The element does not react to pointer events.

initial Sets this property to its default value. See initial.

inherit Inherits this property from its parent element. See inherit.

Recommended study: "HTML Video Tutorial"

The above is the detailed content of How to prohibit clicks on html a. 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