【发布时间】:2018-10-25 05:13:15
【问题描述】:
如何在 按钮 或 a 上使用 cursor: not-allowed >?我尝试了以下方法:
.not-allowed {
pointer-events: auto! important;
cursor: not-allowed! important;
}
我的按钮如下所示:
<a class="btn btn-primary btn-lg disabled not-allowed" href="https://www.example.com" role="button">Test</a>
如果没有激活指针事件,光标就不能改变。但是如果pointer-events: auto,按钮或a 是可点击的。如果 pointer-events: none 光标没有改变。
请帮助我,我绝望了!
【问题讨论】:
-
可以使用
pointer-events: auto !important;(感叹号前的空格)
标签: css bootstrap-4