Spaces:
Running
Running
cutechicken
commited on
Update index.html
Browse files- index.html +57 -8
index.html
CHANGED
@@ -88,7 +88,34 @@
|
|
88 |
font-size: 72px;
|
89 |
color: white;
|
90 |
text-shadow: 2px 2px 5px black;
|
91 |
-
margin-bottom:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
.stageButton {
|
94 |
padding: 15px 30px;
|
@@ -98,7 +125,10 @@
|
|
98 |
border: none;
|
99 |
border-radius: 5px;
|
100 |
cursor: pointer;
|
101 |
-
|
|
|
|
|
|
|
102 |
}
|
103 |
.stageButton:disabled {
|
104 |
background: #666;
|
@@ -135,11 +165,31 @@
|
|
135 |
|
136 |
<div id="titleScreen">
|
137 |
<h1>TANK WAR</h1>
|
138 |
-
<div
|
139 |
-
<
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
</div>
|
144 |
</div>
|
145 |
<div id="shop" style="display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,0.9); padding:20px; border-radius:10px; color:white; z-index:1000;">
|
@@ -185,7 +235,6 @@
|
|
185 |
</div>
|
186 |
<button id="bossButton" class="button">Fight Boss!</button>
|
187 |
<div id="winMessage" class="button" style="font-size: 72px; background: none;">You Win!</div>
|
188 |
-
|
189 |
<script>
|
190 |
const canvas = document.getElementById('gameCanvas');
|
191 |
const ctx = canvas.getContext('2d');
|
|
|
88 |
font-size: 72px;
|
89 |
color: white;
|
90 |
text-shadow: 2px 2px 5px black;
|
91 |
+
margin-bottom: 30px;
|
92 |
+
}
|
93 |
+
.stage-container {
|
94 |
+
display: flex;
|
95 |
+
gap: 40px;
|
96 |
+
align-items: flex-start;
|
97 |
+
}
|
98 |
+
.stage-item {
|
99 |
+
display: flex;
|
100 |
+
flex-direction: column;
|
101 |
+
align-items: center;
|
102 |
+
gap: 15px;
|
103 |
+
}
|
104 |
+
.stage-preview {
|
105 |
+
width: 200px;
|
106 |
+
height: 120px;
|
107 |
+
border: 3px solid #4CAF50;
|
108 |
+
border-radius: 8px;
|
109 |
+
overflow: hidden;
|
110 |
+
transition: transform 0.3s ease;
|
111 |
+
}
|
112 |
+
.stage-preview img {
|
113 |
+
width: 100%;
|
114 |
+
height: 100%;
|
115 |
+
object-fit: cover;
|
116 |
+
}
|
117 |
+
.stage-preview:hover {
|
118 |
+
transform: scale(1.05);
|
119 |
}
|
120 |
.stageButton {
|
121 |
padding: 15px 30px;
|
|
|
125 |
border: none;
|
126 |
border-radius: 5px;
|
127 |
cursor: pointer;
|
128 |
+
transition: background-color 0.3s ease;
|
129 |
+
}
|
130 |
+
.stageButton:hover {
|
131 |
+
background: #45a049;
|
132 |
}
|
133 |
.stageButton:disabled {
|
134 |
background: #666;
|
|
|
165 |
|
166 |
<div id="titleScreen">
|
167 |
<h1>TANK WAR</h1>
|
168 |
+
<div class="stage-container">
|
169 |
+
<div class="stage-item">
|
170 |
+
<button class="stageButton" onclick="startStage(1)">Stage 1</button>
|
171 |
+
<div class="stage-preview">
|
172 |
+
<img src="stage1.png" alt="Stage 1 Preview">
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
<div class="stage-item">
|
176 |
+
<button class="stageButton" onclick="startStage(2)">Stage 2</button>
|
177 |
+
<div class="stage-preview">
|
178 |
+
<img src="stage2.png" alt="Stage 2 Preview">
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
<div class="stage-item">
|
182 |
+
<button class="stageButton" onclick="startStage(3)">Stage 3</button>
|
183 |
+
<div class="stage-preview">
|
184 |
+
<img src="stage3.png" alt="Stage 3 Preview">
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
<div class="stage-item">
|
188 |
+
<button class="stageButton" disabled>Stage 4</button>
|
189 |
+
<div class="stage-preview">
|
190 |
+
<img src="stage4.png" alt="Stage 4 Preview">
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
</div>
|
194 |
</div>
|
195 |
<div id="shop" style="display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,0.9); padding:20px; border-radius:10px; color:white; z-index:1000;">
|
|
|
235 |
</div>
|
236 |
<button id="bossButton" class="button">Fight Boss!</button>
|
237 |
<div id="winMessage" class="button" style="font-size: 72px; background: none;">You Win!</div>
|
|
|
238 |
<script>
|
239 |
const canvas = document.getElementById('gameCanvas');
|
240 |
const ctx = canvas.getContext('2d');
|