Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 5 years ago

Countdown Timer with flipping animation and pause/resume functions

Bonrey•1,130
@Bonrey
A solution to the Launch countdown timer challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


That was quite a tough challenge, but I think I learned quite a lot (working with setInterval(), setTimeout() in JS; adding animation via JS, etc.)!

The most difficult part was to animate the cards. I struggled for some time with css and then tortured myself with js, but eventually it worked 😅 (There's a bug where numbers kind of skew a pixel or two every time they flip. I've tried really hard to get rid of it, but the only solution was to change the width/height of the card, which worked only for the desktop design. P.S. I tried all kinds of length units, like px, rem, %, vw, etc.).

In terms of functionality, you can do the following:

  • Press "Space" key to pause/resume the timer;
  • Press "Enter" key to see what happens at the end of the countdown (there's some extra animation I added);
  • Click social-media links to refresh the page and therefore restart the timer.

As always, any feedback is welcome!

Happy coding, everyone! 😉

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Bonrey's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License