Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

mostly css animations and some JS

@Nedjeljko-Miloslavic

Desktop design screenshot for the Launch countdown timer coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


This is not fully finished project. I might return to it later. Right now, if you change tabs my animations won't be in sync. This is probably a way browsers spare CPU from over-work. There is a way to fix this with JS, but I would have to change a lot of code and, for now, i'm gonna leave that for later. But if some of you have a desire to experiment with my code go ahead!

Community feedback

Steven Toben• 750

@steventoben

Posted

In regards to your animation being out of sync when switching tabs, that has to do with the browser's execution stack and the use of RequestAnimationFrame. RAF fires at 60fps but to optimize performance, if the tab is not being viewed the tick rate is throttled to around 2fps. If you want you could just keep the state of the timer and use the visibility API to check for when the tab regains focus and catch the value of the display up to the state.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord