css – 如何在禁用或Bootstrap 4中更改光标?
作者:互联网
2026-03-24
如何使用光标:按钮上不允许或者?我尝试了以下方法: My Link
.not-allowed { pointer-events: auto! important; cursor: not-allowed! important;} 我的按钮看起来像这样:
Test
如果没有指针事件激活,则无法更改光标.但如果指针事件:自动,按钮或a是可点击的.如果指针事件:无光标不会改变.
请帮帮我,我绝望了!
这实际上是Bootstrap中的 bug建议的解决方案:
button:disabled { cursor: not-allowed; pointer-events: all !important;} 或者如果你有这种结构:
然后
li.disabled { cursor: not-allowed;}li.disabled a { pointer-events: none;}
相关推荐
