Closed ghost closed 2 years ago
编辑 site_folder/scripts/fireworks.js
site_folder/scripts/fireworks.js
hexo.extend.injector.register('body_begin', '<canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;" ></canvas><script defer src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script defer src="https://static.example.com/js/fireworks.js"></script>', 'default');
在 Hexo-NexT 添加打字特效、鼠标点击特效 介绍的四种鼠标点击特效中, 只有 explosion 特效需要设置 <canvas> 并引入 anime.js . Commit 53aede9 尝试将此特效内置到主题中, 以方便快速切换.
explosion
<canvas>
anime.js
借鉴了这个主题的代码: Molunerfinn's Hexo Theme Melody
PR closed since this is my problem. Sorry for inconvenience.
No Need to edit theme code
编辑
site_folder/scripts/fireworks.js
Original content
在 Hexo-NexT 添加打字特效、鼠标点击特效 介绍的四种鼠标点击特效中, 只有
explosion
特效需要设置<canvas>
并引入anime.js
. Commit 53aede9 尝试将此特效内置到主题中, 以方便快速切换.借鉴了这个主题的代码: Molunerfinn's Hexo Theme Melody