UNPKG

s-getstyle

Version:

获取DOM元素样式的方法

7 lines 172 B
/** * 获取DOM元素样式的方法 */ const getStyle = function(obj){ return getComputedStyle?getComputedStyle(obj,false):obj.currentStyle } export default getStyle