@ApplePieGiraffe
Posted
Hey, Guy Ezra! 👋
Nice to see you complete another challenge! Good work on this one! 👍
In addition to emestabillo's helpful feedback, I suggest adding the background image as a CSS background image and setting background-size
to cover
so that the image fills the entire screen but is cropped and doesn't distort when the page is resized. 😉
Keep coding (and happy coding, too)! 😁
@ezraguy
Posted
Hey, @ApplePieGiraffe thank you for the feedback. It's always a pleasure to get feedback from you!. About the background image, I don't think making the background picture as a background image in CSS is the right way to go in this project because of the files I get with this project. I receive a total of 6 images. 3 images of day time (mobile, tablet, and desktop) and 3 images of the night time (mobile, tablet, and desktop). so I have to do calculations to decide the right image (depending on the time of day which I get from the API) and the width of the screen.
@ApplePieGiraffe
Posted
@ezraguy
I see—maybe you might be able to change the CSS background image in JS using something like body.style.backgroundImage = src;
, but I suppose you could add it to your HTML, too. 😉 Keep it up! 👍