<!doctype html> | |
<style> | |
img { | |
object-fit: scale-down; | |
object-position: 0 0; | |
} | |
div { | |
width: 1000px; | |
height: 1000px; | |
background-color: blue; | |
} | |
</style> | |
<div> | |
<img src="resources/blue-100-px-square.png" | |
srcset="resources/blue-100-px-square.png 100w, | |
resources/green-400-px-square.png 400w"> | |
</img> | |
</div> |