微件:GGLScratchGame:修订间差异
来自Limbo Wiki Mirror
无编辑摘要 |
无编辑摘要 标签:(旧)WikiEditor |
||
| 第1行: | 第1行: | ||
<noinclude> | <noinclude> | ||
刮刮乐 Widget(稳定版) | |||
</noinclude> | </noinclude> | ||
<includeonly> | <includeonly> | ||
<div class="ggl-wrapper"> | |||
<div class="ggl-ticket"> | |||
<div class="ggl-reveal"></div> | |||
<div class="ggl-grid"></div> | |||
</div> | |||
</div> | |||
<style> | <style> | ||
.ggl-wrapper { | .ggl-wrapper { | ||
width: 360px; | |||
margin: | margin: 20px auto; | ||
} | } | ||
| 第18行: | 第24行: | ||
background-image: url("https://wm.gaoice.run/images/thumb/b/b6/%E5%9B%BE%E7%89%871.png/180px-%E5%9B%BE%E7%89%871.png"); | background-image: url("https://wm.gaoice.run/images/thumb/b/b6/%E5%9B%BE%E7%89%871.png/180px-%E5%9B%BE%E7%89%871.png"); | ||
background-size: cover; | background-size: cover; | ||
border-radius: | background-position: center; | ||
border-radius: 12px; | |||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
/* | /* 刮开后 */ | ||
.ggl-reveal { | .ggl-reveal { | ||
position: absolute; | position: absolute; | ||
| 第30行: | 第37行: | ||
} | } | ||
/* | /* 30 格 */ | ||
.ggl-grid { | .ggl-grid { | ||
position: absolute; | position: absolute; | ||
inset: 0; | inset: 0; | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat( | grid-template-columns: repeat(5, 1fr); | ||
grid-template-rows: repeat( | grid-template-rows: repeat(6, 1fr); | ||
} | } | ||
.ggl-cell { | .ggl-cell { | ||
background-image: url("https://wm.gaoice.run/images/thumb/5/5a/%E5%88%AE%E5%BC%80%E5%89%8D.png/180px-%E5%88%AE%E5%BC%80%E5%89%8D.png"); | background-image: url("https://wm.gaoice.run/images/thumb/5/5a/%E5%88%AE%E5%BC%80%E5%89%8D.png/180px-%E5%88%AE%E5%BC%80%E5%89%8D.png"); | ||
background-size: cover; | background-size: cover; | ||
| 第49行: | 第54行: | ||
.ggl-cell.scratched { | .ggl-cell.scratched { | ||
background: transparent; | background: transparent; | ||
} | } | ||
</style> | </style> | ||
<script> | <script> | ||
(function () { | (function () { | ||
var wrapper = document.currentScript.parentNode; | |||
var grid = wrapper.querySelector('.ggl-grid'); | |||
if (!grid) return; | |||
for (var i = 0; i < 30; i++) { | |||
var cell = document.createElement('div'); | |||
cell.className = 'ggl-cell'; | |||
cell.onclick = function () { | |||
this.classList.add('scratched'); | |||
}; | |||
grid.appendChild(cell); | |||
} | |||
})(); | })(); | ||
</script> | </script> | ||
</includeonly> | </includeonly> | ||
2026年2月1日 (日) 17:23的版本
刮刮乐 Widget(稳定版)
