Design comparison
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.
Community feedback
- @correlucasPosted about 2 years ago
👾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 helpful1@rynex-zvPosted about 2 years ago@correlucas Thanks for the tips!
So
<picture>
is like an<img>
media query container in html, nice!I haven't learned html before, I'm learning it as i go; and things like this are not visible without someone pointing them, thanks so much! I will start including the CSS RESET in my projects😊
2 question though:
1.how do you get the frame size as the solution previewer? I have scaled distances and set them as reference images but when I load the project my container is always smaller than expected so what do you think is going on?
- Attribute
c
not allowed on elementbutton
at this point.
Context:
<button id=`submeter` class=`card-btn` c=`n`>
what else shall I do? is it really wrong? I'm using it to change the animation state and thebutton
is the container of thesvg
and thespan
.0 - Attribute
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