匿名
未登录
中文(中国大陆)
登录
Limbo Wiki Mirror
搜索
查看“︁微件:GGLScratchGame”︁的源代码
来自Limbo Wiki Mirror
命名空间
微件
讨论
更多
更多
页面操作
阅读
查看源代码
历史
←
微件:GGLScratchGame
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您没有权限编辑
微件
命名空间内的页面。
您可以查看和复制此页面的源代码。
<noinclude> 赛博刮刮乐 · 完整结构版 </noinclude> <includeonly> <div class="ggl-root"> <div class="ggl-ticket"> <div class="ggl-scratch-area"></div> </div> <div class="ggl-ui"> <div class="ggl-mascot" id="gglMascot">(`・ω・´) 等待扫描</div> <button class="ggl-btn" id="gglDraw">来一张彩票</button> <button class="ggl-btn" id="gglScan">扫描结果</button> </div> </div> <style> .ggl-root { max-width: 420px; margin: 20px auto; font-family: sans-serif; } /* 彩票背景 */ .ggl-ticket { position: relative; width: 100%; height: 750px; /* ⚠️ 固定高度,避免 aspect-ratio 坑 */ background-image: url("https://wm.gaoice.run/images/thumb/b/b6/%E5%9B%BE%E7%89%871.png/1075px-%E5%9B%BE%E7%89%871.png"); background-size: cover; background-position: center; } /* 刮奖区(黄色块) */ .ggl-scratch-area { position: absolute; left: 11%; top: 23.5%; width: 78%; height: 53%; } /* 单格 */ .ggl-cell { position: absolute; width: 20%; height: 16.66%; } .ggl-reveal, .ggl-cover { position: absolute; inset: 0; background-size: cover; } .ggl-reveal { background-image: url("https://wm.gaoice.run/images/thumb/4/4a/%E5%88%AE%E5%BC%80%E5%90%8E.jpg/559px-%E5%88%AE%E5%BC%80%E5%90%8E.jpg"); } .ggl-cover { background-image: url("https://wm.gaoice.run/images/thumb/5/5a/%E5%88%AE%E5%BC%80%E5%89%8D.png/559px-%E5%88%AE%E5%BC%80%E5%89%8D.png"); cursor: pointer; } .ggl-cell.scratched .ggl-cover { display: none; } /* 气泡 */ .ggl-bubble { position: absolute; bottom: 105%; left: 0; background: rgba(0,0,0,0.8); color: #0f0; font-size: 11px; padding: 4px 6px; display: none; z-index: 5; } .ggl-cell.scratched .ggl-bubble { display: block; } /* UI */ .ggl-ui { margin-top: 8px; } .ggl-mascot { background: #111; color: #0f0; padding: 6px; font-size: 12px; margin-bottom: 6px; } .ggl-btn { width: 48%; margin-right: 2%; } </style> <script> (function () { var root = document.currentScript.parentNode; var area = root.querySelector('.ggl-scratch-area'); var mascot = root.querySelector('#gglMascot'); var drawBtn = root.querySelector('#gglDraw'); /* 状态文本 1–11 */ var states = { 1: '', 2: '(`・ω・´) 扫描中…', 3: '(≧▽≦) 太棒了!', 4: '(・_・?) 思考中', 5: '(;゚Д゚) 不对劲', 6: '你在看哪里?', 7: '……', 8: '哦、哈、别挠', 9: '你是谁?', 10: '停下来。', 11: '平安喜乐。' }; var tickets = [ [2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], [3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] ]; var currentTicket = 0; function renderTicket() { area.innerHTML = ''; var data = tickets[currentTicket] || []; mascot.textContent = '(`・ω・´) 新的彩票'; for (var i = 0; i < 30; i++) { var cell = document.createElement('div'); cell.className = 'ggl-cell'; cell.style.left = (i % 5) * 20 + '%'; cell.style.top = Math.floor(i / 5) * 16.66 + '%'; var reveal = document.createElement('div'); reveal.className = 'ggl-reveal'; var cover = document.createElement('div'); cover.className = 'ggl-cover'; var bubble = document.createElement('div'); bubble.className = 'ggl-bubble'; (function (state) { cover.onclick = function () { cell.classList.add('scratched'); bubble.textContent = states[state] || ''; if (state === 2) mascot.textContent = states[2]; }; })(data[i] || 1); cell.appendChild(reveal); cell.appendChild(cover); cell.appendChild(bubble); area.appendChild(cell); } } drawBtn.onclick = function () { renderTicket(); currentTicket++; }; renderTicket(); })(); </script> </includeonly>
返回
微件:GGLScratchGame
。
导航
导航
首页
最近更改
随机页面
操作申请
帮助
入门指南
编辑指南
写作指南
随机
官方
碎数研
谜题保管所
wiki工具
wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志