This is a solution to the FAQ accordion card challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout depending on their device's screen size
- See hover states for interactive elements
- Solution URL: faq-accordion-card-solution
- Live Site URL: faq-accordion-card-solution
- HTML
- SCSS
- Mobile workflow
- Responsive
I learned how to use and style the <details>
and <summary>
HTML elements and bobbing animation to the floating cube (with drop-shadow
).
<details>
<summary>How many team members can I invite</summary>
<p>You can invite up to 2 additional users on the Free plan. There is no limit on team members for the Premium plan.</p>
</details>
@keyframes updown {
0% {
filter: drop-shadow(0 15px 15px rgba(0, 0, 0, .3));
transform: translate(0);
}
50% {
filter: drop-shadow(0 15px 15px rgba(0, 0, 0, .1));
transform: translateY(-1rem);
}
100% {
filter: drop-shadow(0 15px 15px rgba(0, 0, 0, .3));
transform: translate(0);
}
}
For future projects I need to focus on using more advanced CSS to create effects.
- W3 School - This helped me for my basic knowledge. I really liked this pattern and will use it going forward.
- How To Create an Overlay Image Icon - This helped me to add an overlay to the image on hover.
- Using only CSS, show div on hover over another element - This Stack Overflow question helped me to figure out how to show the view icon on hover.
- Portfolio - montyaction
- Frontend Mentor - @montyaction
- Twitter - @MontyKanwar19
- Instagram - frontend_action