Spaces:
Running
Running
Update index.html
Browse files- index.html +27 -0
index.html
CHANGED
@@ -66,6 +66,31 @@
|
|
66 |
font-weight: bold;
|
67 |
color: #0078D4;
|
68 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
.feedback {
|
70 |
margin-top: 10px;
|
71 |
font-size: 18px;
|
@@ -159,6 +184,8 @@
|
|
159 |
const isCorrect = selectedAnswer === question.correct;
|
160 |
const value = (difficulty + 1) * 100;
|
161 |
|
|
|
|
|
162 |
if (isCorrect) {
|
163 |
score += value;
|
164 |
questionDisplay.innerHTML += `<p class="feedback" style="color: green;">Correct! You earned $${value}.</p>`;
|
|
|
66 |
font-weight: bold;
|
67 |
color: #0078D4;
|
68 |
}
|
69 |
+
.answer-btn {
|
70 |
+
margin: 10px;
|
71 |
+
padding: 15px 20px;
|
72 |
+
font-size: 18px;
|
73 |
+
cursor: pointer;
|
74 |
+
display: block;
|
75 |
+
width: 100%;
|
76 |
+
max-width: 300px;
|
77 |
+
text-align: center;
|
78 |
+
border: 2px solid #005a9e;
|
79 |
+
border-radius: 5px;
|
80 |
+
background-color: #0078D4;
|
81 |
+
color: #fff;
|
82 |
+
font-weight: bold;
|
83 |
+
transition: background-color 0.3s, color 0.3s;
|
84 |
+
}
|
85 |
+
.answer-btn:hover {
|
86 |
+
background-color: #005a9e;
|
87 |
+
color: #f0f0f0;
|
88 |
+
}
|
89 |
+
.answer-btn.disabled {
|
90 |
+
background-color: #cccccc;
|
91 |
+
color: #666;
|
92 |
+
cursor: not-allowed;
|
93 |
+
}
|
94 |
.feedback {
|
95 |
margin-top: 10px;
|
96 |
font-size: 18px;
|
|
|
184 |
const isCorrect = selectedAnswer === question.correct;
|
185 |
const value = (difficulty + 1) * 100;
|
186 |
|
187 |
+
document.querySelectorAll('.answer-btn').forEach(btn => btn.classList.add('disabled'));
|
188 |
+
|
189 |
if (isCorrect) {
|
190 |
score += value;
|
191 |
questionDisplay.innerHTML += `<p class="feedback" style="color: green;">Correct! You earned $${value}.</p>`;
|