1 Star 0 Fork 9

[SVIP]/博客

forked from mumu/博客 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
wulinlin 提交于 2024-10-24 13:56 +08:00 . fix:update
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>制作幸运旋转盘游戏</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
<div class="spin"></div>
<div class="wheel">
<div class="number" style="--i: 1; --color: #db7093">
<span>520w</span>
</div>
<div class="number" style="--i: 2; --color: #20b2aa">
<span>1w</span>
</div>
<div class="number" style="--i: 3; --color: #b63e92">
<span>20w</span>
</div>
<div class="number" style="--i: 4; --color: #daa520">
<span>2000w</span>
</div>
<div class="number" style="--i: 5; --color: #ff7f50">
<span>10w</span>
</div>
<div class="number" style="--i: 6; --color: #ff340f">
<span>1w</span>
</div>
<div class="number" style="--i: 7; --color: #3cb371">
<span>2w</span>
</div>
<div class="number" style="--i: 8; --color: #4169e1">
<span>888w</span>
</div>
</div>
</div>
<!-- 🎉礼花筒效果 confetti 库 -->
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.4.0/dist/confetti.browser.min.js"></script>
<script>
const wheel = document.querySelector(".wheel");
const spin = document.querySelector(".spin");
let value = Math.ceil(Math.random() * 3600);
spin.addEventListener("click", () => {
wheel.style.transform = `rotate(${value}deg)`;
value += Math.ceil(Math.random() * 3600);
});
wheel.addEventListener("transitionend", () => {
confetti();
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lvjinhui/blog.git
git@gitee.com:lvjinhui/blog.git
lvjinhui
blog
博客
8cdf6d98ef5b00b58f202d013174fb1ad2c86012

搜索帮助