" pointer-events: none "在IE9和IE10中不起作用



大家早上好!我想让一个链接不可点击这是我的css

         .disable {
            pointer-events: none;
            cursor: not-allowed !important;
            opacity: 0.5;
          }

此代码可以在Mozilla Firefox和Chrome中正常工作,但不能在ie9或ie10中正常工作。所以我想问pointer-events: none;是否有这个属性的选项

指针事件不支持IE9/10。它只支持IE11。链接:http://caniuse.com/#feat=pointer-events

下面是代码:

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; 
}

最新更新