我想知道如何将not-allowed光标放在禁用的链接上。我尝试将其添加到禁用事件中,但在那里不起作用,然后我尝试使用相同的光标事件引入悬停效果。关于如何让它发挥作用有什么想法吗?我在这里添加了我的 CSS 代码:
.disabled {
pointer-events: none;
cursor: not-allowed;
text-decoration: none;
color: rgba(255, 255, 255, 0.25);
}
.disabled:hover {
cursor: not-allowed;
}
Run Code Online (Sandbox Code Playgroud)
我的 HTML 在这里:
<li><a href="index.html" class="disabled">Home</a></li>
Run Code Online (Sandbox Code Playgroud)