1、js判断浏览器是否支持css3属性


function supportCss3(style){var prefix=['webkit','Moz','ms','o'],i,humpString=[],htmlStyle=document.documentElement.style,_toHumb=function(string){return string.replace(/-(\w)/g,function($0,$1){return $1.toUpperCase()})};for(i in prefix){humpString.push(_toHumb(prefix[i]+'-'+style));console.log(humpString)}humpString.push(_toHumb(style));for(i in humpString){if(humpString[i]in htmlStyle){return true}}return false}; console.warn(supportCss3('animation-fill-mode'));

2、~~

相关文章:

  • 2021-06-12
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-08-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-16
  • 2021-06-07
  • 2022-12-23
  • 2021-07-17
  • 2021-07-31
  • 2022-12-23
相关资源
相似解决方案