Home > Web Front-end > CSS Tutorial > How to make a tag unclickable in css

How to make a tag unclickable in css

青灯夜游
Release: 2023-01-05 16:11:27
Original
9124 people have browsed it

How to make a tag non-clickable in css: first use the "color:gray" statement to set the color to gray; then use the "pointer-events:none" statement to disable event response; finally use "cursor:default" The statement sets the mouse style to the default style.

How to make a tag unclickable in css

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

There is no disabled attribute for the a tag in css. If you want to make the a tag unavailable, you must set the style of the a tag separately to make it unavailable.

1. Set the color to gray

2. Disable event response

3. Set the mouse style to the default style - select the arrow style

Example:

<a href="#" style="pointer-events: none;cursor: default;color:gray;">点击</a>
<a href="#">点击</a>
Copy after login

Rendering:

How to make a tag unclickable in css

(Learning video sharing: css video tutorial)

The above is the detailed content of How to make a tag unclickable 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