时间:2021-07-01 10:21:17 帮助过:3人阅读
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;}