#spiritual-d9-container {
font-family: Arial, sans-serif; text-align: center;
background-color: #f9f9f9; padding: 20px;
border: 2px solid #4CAF50; border-radius: 15px;
max-width: 100%; margin: 0 auto;
}
.road-wp {
width: 100%; height: 100px; background-color: #333;
position: relative; border-radius: 10px; overflow: hidden; margin-top: 20px;
}
.car-wp {
position: absolute; top: 30px; width: 50px; height: 40px;
background-color: #4CAF50; color: white; border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: bold; font-size: 12px; transition: right 0.1s linear;
right: 0%;
}
.obstacle-wp {
position: absolute; top: 30px; width: 50px; height: 40px;
background-color: #F44336; color: white; border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-weight: bold; font-size: 12px; right: 70%;
}
.line-wp {
position: absolute; top: 48px; width: 100%; height: 4px;
background: repeating-linear-gradient(90deg, white, white 20px, transparent 20px, transparent 40px);
}
🚜 D9 רוחני – המרכבה
ממתין לפקודה…
הפעל מנוע
function startDrive() {
let pos = 0;
let car = document.getElementById(‘wpCar’);
let status = document.getElementById(‘wpStatusText’);
status.innerText = “יוצא לדרך…”;
let timer = setInterval(() => {
if (pos >= 60 && pos {
status.innerText = “✨ המכשול נפרץ!”;
status.style.color = “green”;
pos += 20;
resume();
}, 1000);
} else if (pos >= 90) {
status.innerText = “🏁 הגיע לתכלית!”;
clearInterval(timer);
} else {
pos++;
car.style.right = pos + ‘%’;
}
}, 50);
function resume() {
timer = setInterval(() => {
if (pos >= 90) {
status.innerText = “🏁 הגיע לתכלית!”;
clearInterval(timer);
} else {
pos++;
car.style.right = pos + ‘%’;
}
}, 50);
}
}