@Gehad28
Posted
Nice work!
One thing that I have learnt from another member here:
To change the image according to the screen size, use <picture>
tag instead of an empty div with background-img
. You can use it as following:
<picture>
<source media="(max-width: 380px)" srcset="assets/images/illustration-sign-up-mobile.svg">
<img src="assets/images/illustration-sign-up-desktop.svg" alt="...">
</picture>
In the source
tag we put the image for a certian screen size, and in the img
tag we put the default image.
Keep going ☘️
Marked as helpful
@cacesasa
Posted
@Gehad28 awesome, that's good to know. Thank you for the feedback and for taking the time to look at my code.