app/liteyuki/resources/templates/js/bg.js
snowy bc856b4aa9 feat: 新的背景图
fix: 命令冲突
docs: 添加了命令头和nickname冲突的解释
2024-04-06 04:23:01 +08:00

15 lines
294 B
JavaScript

const bgs = [
"bg1.png",
"bg2.png",
"bg3.png",
"bg4.png",
"bg5.png",
"bg6.png",
"bg7.png",
"bg8.png",
"bg9.png",
"bg10.png",
]
// 随机选择背景图片
document.body.style.backgroundImage = `url(./img/${bgs[Math.floor(Math.random() * bgs.length)]})`;