在下拉菜单中禁用链接,但保留css [英] Disable link in dropdown menu but keep the css
本文介绍了在下拉菜单中禁用链接,但保留css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在jsfiddle上有以下菜单: http://jsfiddle.net/aL7Xe/1000/
I have the following menu on jsfiddle : http://jsfiddle.net/aL7Xe/1000/
我已禁用Bewerkingen链接:
I disabled the "Bewerkingen" link with :
a[href="/test4/disabled"] {
pointer-events: none;
}
因为它是一个下拉菜单,我的css似乎消失了,我该如何解决这个问题?或者我应该使用什么代码来禁用该链接,但仍然有我的下拉菜单和CSS?我使用Drupal,所以在链接中使用#不能工作
because its a dropdown menu, but when I use that code my css seems to dissapear, how can I fix this? or what code should I use to disable that link but still have my dropdown menu and css on it ? I am using Drupal so using # in the link is not going to work
先感谢任何帮助:)
推荐答案
尝试:
<a href='#'>Bewerkingen</a>
您不需要使用
a[href="/test4/disabled"] {
pointer-events: none;
}
这篇关于在下拉菜单中禁用链接,但保留css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文