Is there a css-only solution to scale an image into a bounding box (keeping aspect-ratio)? This works if the image is bigger than the container:
img { max-
html:
css:
.container{ width: 100px; height: 100px; } .flowerImg{ width: 100px; height: 100px; object-fit: cover; /*object-fit: contain; object-fit: scale-down; object-position: -10% 0; object-fit: none; object-fit: fill;*/ }