代码来源:https://www.onesrc.cn/p/add-a-fireworks-click-effect-to-your-website.html https://cdn.jsdelivr.net/gh/kaygb/blog-images/fireworks.js
<script src="//cdn.jsdelivr.net/gh/kaygb/JS-effects/fireworks.js"></script>
<script>
window.onload = function() {
setTimeout(function() {
let script = document.createElement("script");
script.src = "//cdn.jsdelivr.net/gh/kaygb/JS-effects/fireworks.js";
document.body.appendChild(script);
}, 2e3);
}
</script>