Design comparison
SolutionDesign
Solution retrospective
I wanted to create a smooth transition to the Thank You page, and this is what I came up with. Any suggestions on how to do a smoother transition after you hit "SUBMIT"?
"rating" was the name of my div with the first state, and "thanks" is the second div. They both had a CSS property of transition: opacity 250ms;
rating.style.opacity = 0;
rating.addEventListener("transitionend", function () {
rating.classList.add("hidden");
thanks.classList.remove("hidden");
setTimeout(() => (thanks.style.opacity = 1));
});
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