Design with Flexbox, Transitions, Animations and Image Positioning
Design comparison
Solution retrospective
My question is regarding user experience, I added an accordion animation to show and hide the answer to the questions, I think the accordion work well in this case because the answers (sentence) have almost the same amount of lines, 2 or 3. But if there were some 2, 3 liners and other with something like 10 or more lines would the accordion behavior still be a good choice or would we need to think of a different solution in this case?
Community feedback
- @blahkingPosted about 2 years ago
Your solution set the "card__faq__answer" same height, you can use JS to control "card__faq__answer" height dynamically. When "card__faq" is active state, set the "card__faq__answer" element's height be "card__faq__answer".scrollHeight, else "card__faq__answer" element's height will set be "0px". Hope it helps you
0
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