-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyles.css
86 lines (75 loc) · 2.07 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
overflow: hidden; /* スクロールを無効にする */
}
.game-container {
text-align: center;
}
.score-board {
font-size: 2em;
margin-bottom: 20px;
}
.time-board {
font-size: 1.5em;
margin-bottom: 20px;
}
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}
.hole {
width: 100px;
height: 100px;
background-color: #8b4513;
border-radius: 50%;
position: relative;
overflow: hidden; /* 画像がホールの外に出ないようにする */
}
.hole img {
position: absolute;
width: 120%; /* クリック領域を広げる */
height: 120%; /* クリック領域を広げる */
top: 100%;
left: -10%; /* クリック領域を広げる */
display: none;
transition: top 0.3s ease;
user-select: none; /* ドラッグを無効にする */
-webkit-user-drag: none; /* ドラッグを無効にする */
}
.hole img.up {
top: 0;
}
.hole img.shake {
animation: shake 0.2s infinite;
}
.game-over {
text-align: center;
font-size: 1.5em;
margin-top: 20px;
}
@keyframes shake {
0% { transform: translate(1px, 1px) rotate(0deg); }
10% { transform: translate(-1px, -2px) rotate(-1deg); }
20% { transform: translate(-3px, 0px) rotate(1deg); }
30% { transform: translate(3px, 2px) rotate(0deg); }
40% { transform: translate(1px, -1px) rotate(1deg); }
50% { transform: translate(-1px, 2px) rotate(-1deg); }
60% { transform: translate(-3px, 1px) rotate(0deg); }
70% { transform: translate(3px, 1px) rotate(-1deg); }
80% { transform: translate(-1px, -1px) rotate(1deg); }
90% { transform: translate(1px, 2px) rotate(0deg); }
100% { transform: translate(1px, -2px) rotate(-1deg); }
}
@media (max-width: 600px) {
.hole {
width: 70px;
height: 70px;
}
}