Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
Hi here is my solution for Launch-countdown-timer. I used HTML, CSS, JS.
What challenges did you encounter, and how did you overcome them?It was to do the math for the timer and display it. And it was the card flip within the times change.
timer = Math.floor((launchDate - Date.now()) / 1000);
const days = Math.floor(timer / (60 * 60 * 24));
const hours = Math.floor(timer / (60 * 60)) - days * 24;
const minutes = Math.floor( (timer % (60 * 60)) / 60 );
const secondes = Math.floor( (timer % (60)) );
if(secondes === 0){ //anim minute
document.querySelector('.li-timer:nth-of-type(3) .up').classList.add('anim-one-time');
document.querySelector('.li-timer:nth-of-type(3) .down').classList.add('anim-one-time');
}
What specific areas of your project would you like help with?
Feel free to leave any comment or suggestion. Thanks.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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