How to set hyperlinks to be non-clickable in css

藏色散人
Release: 2023-01-05 16:12:48
Original
2464 people have browsed it

How to set the hyperlink to be non-clickable in css: first use the "cursor:pointer;" attribute to turn the mouse into an arrow; then use the "pointer-events:none;" attribute to make the hyperlink invalid and non-clickable.

How to set hyperlinks to be non-clickable in css

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

Use css settings to make hyperlinks unclickable or invalid

##cursor :pointer;

pointer-events: none;
The first line is to make the mouse turn into an arrow instead of a small hand shape
The second line is to invalidate the hyperlink code

Not only a tag and iframe tag are also valid. The example is as follows:

    
测试
Copy after login

How to set hyperlinks to be non-clickable in css

Original display effect: After hovering the mouse, it will be a small hand shape, the style will change, and it will jump after clicking To the hyperlink

How to set hyperlinks to be non-clickable in css

The display effect after the change: the mouse is in the shape of an arrow when hovering, and there is no response when clicking

For more detailed HTML/CSS knowledge, please visit

CSS video tutorialcolumn!

The above is the detailed content of How to set hyperlinks to be non-clickable 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!