twitter-bootstrap 如何在禁用的锚点悬停时添加禁止圆圈?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31898803/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add ban-circle on hover in disabled anchor?
提问by euler
I have an anchor tag that I would like the ban-circle glyphicon to appear when hovered. I know that adding the disabled class will only change the appearance and not its functionality. Please note that this link is not part of nav components, list or btn group, just a link that will trigger a modal when clicked.
我有一个锚标记,我希望在悬停时出现禁止圆圈字形。我知道添加禁用的类只会改变外观而不是它的功能。请注意,此链接不是导航组件、列表或 btn 组的一部分,只是一个点击时会触发模式的链接。
I want to follow the behaviour when you hover on the disabled link as shown here: Disabled links
当您将鼠标悬停在禁用链接上时,我想遵循该行为,如下所示:禁用链接
<div>
<a class="disabled" data-toggle="modal" data-target="#notAvailable">Not Available</a>
</div>
回答by joyBlanks
use CSS
使用 CSS
a.disabled:hover {
cursor:not-allowed
}
a.disabled:hover {
cursor: not-allowed;
}
<div>
<a class="disabled" data-toggle="modal" data-target="#notAvailable">Not Available</a>
</div>

