过年啦🎊给咱小站也来一场壮丽的🎇烟火表演秀吧 New
只用把以下代码放到后台 - 全局 - 站点信息 - 网站第三方统计代码
🎆 document.getElementById('fireworks-btn').addEventListener('click', function () { const container = document.getElementById('fireworks-container'); const iframe = document.getElementById('fireworks-iframe'); if (container.style.display === 'none' || container.style.display === '') { if (!iframe.src) { iframe.src = 'https://cn.admxn.com/fireworks/dist/index.html'; } container.style.display = 'block'; } else { container.style.display = 'none'; }});
返回前端就能看到右下角的烟火小按钮啦
DEMO:https://cn.admxn.com/
如需本地部署可下载解压后传至站点根目录,然后将上面iframe.src = 'https://cn.admxn.com/fireworks/dist/index.html';中的域名改为你的域名即可 看起来不错,挺应景的,谢谢大大的分享。 打开demo没有烟花啊 看看。感谢您的分享。 感谢分享 <button id="fireworks-btn" title="烟火秀" style="position: fixed; bottom: 20px; right: 20px; cursor: pointer; z-index: 1000;">
🎆
</button>
<div id="fireworks-container" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 999;">
<iframe id="fireworks-iframe" style="width: 100%; height: 100%; border: none; opacity: 0.8;"></iframe>
</div>
<script>
document.getElementById('fireworks-btn').addEventListener('click', function () {
const container = document.getElementById('fireworks-container');
const iframe = document.getElementById('fireworks-iframe');
if (container.style.display === 'none' || container.style.display === '') {
if (!iframe.src) {
iframe.src = 'https://cn.admxn.com/fireworks/dist/index.html';
}
container.style.display = 'block';
} else {
container.style.display = 'none';
}
});
</script> 顶楼主啦..希望楼主多发精品好帖啦..... 好耶✌🏻 kankan看看 页面右下角有个小按钮🎆
页:
[1]