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

How to prohibit clicks on html a

藏色散人
Release: 2023-01-06 11:15:31
Original
7012 people have browsed it

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;"/>
Copy after login

pointer-events Introduction: The

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

Syntax

pointer-events: auto|none;
Copy after login

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!

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