getComputedStyle

  1、getComputedStyle是一个可以获取当前元素所有最终使用的CSS属性值。返回的是一个CSS样式声明对象([object CSSStyleDeclaration]),只读。不支持IE

  var style = window.getComputedStyle("元素", "伪类");


 2、element.style只能获取元素style属性中的CSS样式


 3、currStyle支持IE

 4、getAttribute
  element.style.getAttribute(驼峰命名)
原文地址:https://www.cnblogs.com/fqlGlog/p/7297996.html