标签:
var getKeyFrame = function(index, name){ var styleSheet = document.styleSheets[index], keyframesRule = []; [].slice.call(styleSheet.cssRules).forEach(function(item){ if (item.type == CSSRule.KEYFRAMES_RULE) { if(item.name == name){ keyframesRule.push( item ); } } }) return keyframesRule; }
标签:
原文地址:http://my.oschina.net/u/232595/blog/475492