I’d like to display various images from unsplash, set each as a cover image for a different div card. what should I do to achieve that?
I’d suggest changing each string to an object so you have a nested array of objects with each object containing the text and image URL. You pass an object to the itemcard
function item
parameter. The images will be using the img
element in the template, and not be background images. You need to change url
to the correct attribute for an img
element.