早上好,我想让一个链接不可点击这是我的css。
.disable {
pointer-events: none;
cursor: not-allowed !important;
opacity: 0.5;
}这段代码可以在Mozilla Firefox和Chrome中很好地工作,但在IE9或IE10中就不行了。所以我想问一下是否有pointer-events: none;这个属性的选项。
发布于 2014-05-22 14:09:45
IE9/10不支持Pointer-events,它只支持IE11。请参阅此链接:http://caniuse.com/#feat=pointer-events
发布于 2014-05-22 14:21:02
以下是代码:
HTML:
<a href="#" class="disable">test</a>jQuery:
$(document).ready(function(){
$(".disable").on("click",function(e){
e.preventDefault();
})
});CSS:
.disable,.disable:active {
cursor:default;
opacity: 0.5;
color:blue;
}https://stackoverflow.com/questions/23798827
复制相似问题