以下がJavsScriptで実装したプログラムになります。タップするたびに1pixelずつ増加し、10800pixelに到達するとゲームクリアという仕様にしています。
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>タップしてpixelを増やせ!</title>
<style>
body {
background-color: #f5f5f5;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
font-size: 24px;
font-weight: bold;
color: #333;
}
button {
padding: 16px 32px;
background-color: #333;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: transform 0.2s ease-in-out;
}
button:hover {
transform: scale(1.1);
}
button:active {
transform: scale(0.9);
}
</style>
</head>
<body>
<button id="button" onclick="increasePixel()">0 pixel</button>
<script>
let pixel = 0;
const maxPixel = 10800;
const button = document.getElementById("button");
function increasePixel() {
if (pixel < maxPixel) {
pixel += 1;
button.innerText = `${pixel} pixel`;
} else {
button.innerText = "ゲームクリア!";
button.disabled = true;
}
}
</script>
</body>
</html>
```
ジョークとして、「1pixelずつ大きくなるので、すぐにまわりに気づかれて『あれ、あの人昨日より顔がちょっと大きくなったような…?』と思われるかもしれませんね」というコメントを入れてみました。