代码拉取完成,页面将自动刷新
"Animated icon": {
"prefix": "anic",
"body": [ "<!--${1:id} animated icon begins-->",
"<div id='icons8-${1:id}' class='bodymovin'></div>",
"",
"<script>",
"",
" (function() {",
" var anime;",
" var state = 0;",
" var name = '${1:id}';",
"",
" function start() {",
" if (state % 2 == 0) {",
" // All animations have 28 frames:",
" // - First 14 ones for changing the satate",
" // - And the next 14 back to return to the original state",
" anim.playSegments([0, 13], true);",
" } else {",
" anim.playSegments([14, 27], true);",
" }",
" state++;",
" }",
"",
" $(document).ready(function () {",
" // Feel free to handle any other events here, not just click or hover",
" $('#icons8-'+name).click(start);",
" $('#icons8-'+name).hover(start);",
"",
" anim = bodymovin.loadAnimation({",
" container: document.getElementById('icons8-'+name),",
" renderer: 'svg',",
" loop: false,",
" autoplay: false,",
" path: 'icons/'+name+'.json'",
" });",
" });",
" })();",
"",
"</script>",
"<!--${1:id} animated icon ends-->"]
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。