Html 如何使用CSS禁用链接?

Html 如何使用CSS禁用链接?,html,css,wordpress,Html,Css,Wordpress,我在wordpress页面中有以下链接 这个类是一个链接。是否可以仅使用CSS禁用链接 <a class="select-slot__serviceStaffOrLocationButton___5GUjl"><i class="material-icons select-slot__serviceStaffOrLocationIcon___3WFzp">timelapse</i><span class="select-slot__serviceName

我在
wordpress
页面中有以下链接

这个类是一个链接。是否可以仅使用
CSS
禁用链接

<a class="select-slot__serviceStaffOrLocationButton___5GUjl"><i class="material-icons select-slot__serviceStaffOrLocationIcon___3WFzp">timelapse</i><span class="select-slot__serviceName___14MHL">Employee Assistance Line</span></a>
TimelapseeEmployee援助热线

您可以这样做:

.select-slot__serviceStaffOrLocationButton___5GUjl {
  pointer-events: none;
  color: black; (the color which is your normal text maybe?)
}

使用
指针事件:无

。选择插槽服务地址按钮{
指针事件:无;
}
TimelapseeEmployee援助热线
将此添加到css

如果要将链接显示为普通文本,请使用此选项

 .select-slot__serviceStaffOrLocationButton___5GUjl
{
pointer-events: none; 
cursor: default; 
text-decoration: none; 
color: black; 
}
 .select-slot__serviceStaffOrLocationButton___5GUjl
{
pointer-events: none; 
cursor: default; 
text-decoration: none; 
color: black; 
}