Home  >  Article  >  Web Front-end  >  获取css3动画关键帧_html/css_WEB-ITnose

获取css3动画关键帧_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:10:481529browse

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;}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn