Is there a way to use CSS to get only a specific part of an image to appear as a div background? Basically like cropping?
This image from adobe pretty much sums up what I mean and what I wish I could do with divs:
I want to use images from the web as background images for divs of specific size (banners for instance). However, most googling takes me to
What would be the way to do that? It's something I'm used to being able to do very easily with most image-editing interfaces (adobe, most social media image editing tools), but I'm finding it very hard to do with CSS. Most googling brings me to things like object-position, or background-size, or object-fit, but all of them assume you want the whole image. I'd love if there was a way to just have a PART of the image visible in your div container.