I'm making a timer app that initially has a white surround around the remaining time in the timer. I want the ring surrounding the remaining time in the timer to gradually turn red, and then turn completely red when the timer runs out.
{remainingTime.hours} : {remainingTime.minutes} : {remainingTime.seconds}
.countdown-timer { width: 400px; height: 400px; border: 6px solid white; border-radius: 50%; box-shadow: black; font-family: "DM Sans"; font-size: 72px; display: flex; justify-content: center; align-items: center; margin-top: 10px; margin-left: auto; margin-right: auto; }
I tried a concentric circle approach but didn't get the effect I wanted.
The effect I want is: https://i.stack.imgur.com/AVOz3.png
---------------------------------CSS File------------------ -----------------------
Among them, X.time is a time threshold, beyond which the surrounding ring should remain white, and when less than this time, it will turn red.