Design comparison
SolutionDesign
Solution retrospective
I've applied max-height: 0
and visibility: hidden
then max-height: 10rem
and visibility: visible
. This way the box is displayed from top to bottom on transition.
How could I make it to display it from bottom to top using this same hidden/visible technique?
Community feedback
- @chegxPosted almost 2 years ago
Hi JOÃO. You can change the
top
property tobottom
:.card-share { align-items: center; background-color: hsl(217, 19%, 35%); border-bottom-left-radius: 0.75rem; border-bottom-right-radius: 0.75rem; display: flex; gap: clamp(1rem, -1.737rem + 11.68vw, 2rem); height: 4rem; max-height: 0; /* overflow: hidden; */ visibility: hidden; padding-inline: 2rem; position: absolute; bottom: 0; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); width: 100%; }
The same for Desktop Layout. Remove
top
property and calculate position from thebottom
.Marked as helpful0@jvmdoPosted almost 2 years ago@chegx whooa thank you. That's quite obvious even tho I couldn't figure it out at the time I was coding 😅
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