Hover and click animation Try it out

Solution retrospective
Timing the animation was difficult. delaying 2 seconds to restore the button attribute was hard to find online, it work now but i don't understand some of it. Keeping Css as small as possible need to be improved.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @correlucas
👾Hello @rynex-zv, Congratulations on completing this challenge!
Your solution its almost done and I’ve some tips to help you to improve it:
1.Using
<picture>
you’ve more control over the elements and its better than using the product image as<img>
orbackground-image
. Look that for SEO and search engine reasons it isn't a better practice to import this product image with CSS since this will make it harder to the image. You can manage both images inside the<picture>
tag and use the html to code to set when the images should change setting the devicemax-width
depending of the device (phone / computer) Here’s a guide about how to usepicture
:https://www.w3schools.com/tags/tag_picture.asp
2.Use units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.3.Something that can be a time saver for you is to use a CSS RESET to remove all default settings for margins, making the images easier to work, see the article below where you can copy and paste this css code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
✌️ I hope this helps you and happy coding!
Marked as helpful - @Cyrus-Akwaboah-Emmanuel
Nice!!!
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