如何使用 CSS 防止点击事件? [英] How to prevent the click event using CSS?
本文介绍了如何使用 CSS 防止点击事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用 CSS 防止点击事件?
我已经创建了表单页面,那么我需要仅使用 CSS 来阻止单击事件吗?
我已经尝试过这个 css 属性,但没有奏效.
内容
div {显示:无;}
解决方案
可以试试css类:
.noClick {指针事件:无;}
How to prevent the click event using CSS ?
I have created the form page , then i need to prevent the click event using only CSS?
I have tried this css property, but not worked.
<div>Content</div>
div {
display: none;
}
解决方案
You can try the css class:
.noClick {
pointer-events: none;
}
这篇关于如何使用 CSS 防止点击事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文