判断支持pointer-events

 

   本代码片段来自Modernizr

 

function test(){
    var elem = document.createElement('x');
    elem.style.cssText = 'pointer-events:auto';
    return elem.style.pointerEvents === 'auto';
}

 

 

你可能感兴趣的:(Modernizr,pointer-events)