Design comparison
Solution retrospective
Hi,
This is my solution to Advice generator app. I have added some cool animations to make it look better. Dice icon inside the button rotates while the advice is being loaded.
The most difficult part for me was to time the animation properly. When the advice is loaded, the icon should complete its rotation before stopping. I did this using animation-play-state
along with following JS:
myElement.addEventListener('animationiteration', (e) => {
// Stop animation by removing class or data attributes
}, {
once: true
});
If you have any suggestion or improvement idea, I would love to know!
Thanks for checking out :)
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