Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 3 years ago

Responsive 3 Column Preview Card [Pure CSS + Animation]

accessibility, animation
xyzeez•670
@xyzeez
A solution to the 3-column preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This challenge was pretty much straight forward and fun. I had a bit of challenge animating the hover state for the hyperlink text (.btn class in my code) but was later able to achieve it by adding a pseudo element ::after.

Here is how I did it:

HTML🏷️:

<a> TEXT </a>

CSS 🎨:

a {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

a::after {
  position: absolute;
  content: "";
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: -1;
}

Then you can add the transition and set property for color on the anchor tag and transform for the ::after.

Your feedbacks and suggestions are highly appreciated!👍🏽

UPGRADES🚀:

  • Improved accessibility
  • Animation

As always, Happy Coding!👨🏽‍💻

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on xyzeez's solution.

Join 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License