Listo. Ahora puedes hacer que la ruleta gire más rápido???
Browse files- index.html +5 -6
index.html
CHANGED
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<style>
|
| 11 |
@keyframes spin {
|
| 12 |
0% { transform: rotate(0deg); }
|
| 13 |
-
100% { transform: rotate(calc(360deg *
|
| 14 |
}
|
| 15 |
-
|
| 16 |
transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1);
|
| 17 |
}
|
| 18 |
.lg\:w-120 {
|
|
@@ -180,11 +180,10 @@ segment.appendChild(questionText);
|
|
| 180 |
let adjustedIndex = selectedSegment % remainingQuestions.length;
|
| 181 |
currentQuestion = remainingQuestions[adjustedIndex];
|
| 182 |
remainingQuestions.splice(adjustedIndex, 1);
|
| 183 |
-
// Spin animation
|
| 184 |
wheel.style.setProperty('--stop-rotation', `${stopRotation}deg`);
|
| 185 |
-
wheel.style.animation = 'spin
|
| 186 |
-
|
| 187 |
-
setTimeout(() => {
|
| 188 |
wheel.style.animation = 'none';
|
| 189 |
wheel.style.transform = `rotate(${stopRotation}deg)`;
|
| 190 |
|
|
|
|
| 10 |
<style>
|
| 11 |
@keyframes spin {
|
| 12 |
0% { transform: rotate(0deg); }
|
| 13 |
+
100% { transform: rotate(calc(360deg * 10 + var(--stop-rotation))); }
|
| 14 |
}
|
| 15 |
+
.wheel {
|
| 16 |
transition-timing-function: cubic-bezier(0.1, 0.7, 0.1, 1);
|
| 17 |
}
|
| 18 |
.lg\:w-120 {
|
|
|
|
| 180 |
let adjustedIndex = selectedSegment % remainingQuestions.length;
|
| 181 |
currentQuestion = remainingQuestions[adjustedIndex];
|
| 182 |
remainingQuestions.splice(adjustedIndex, 1);
|
| 183 |
+
// Spin animation
|
| 184 |
wheel.style.setProperty('--stop-rotation', `${stopRotation}deg`);
|
| 185 |
+
wheel.style.animation = 'spin 3s forwards';
|
| 186 |
+
setTimeout(() => {
|
|
|
|
| 187 |
wheel.style.animation = 'none';
|
| 188 |
wheel.style.transform = `rotate(${stopRotation}deg)`;
|
| 189 |
|