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; }
时间: 2024-11-25 21:30:08