I\'d like to have an HTML page which displays a single PNG or JPEG image. I want the image to take up the whole screen but when I do this:
The easiest way to do so (if you don't need to support IE) is setting the object-fit CSS property to contain:
object-fit
contain
img { object-fit: contain; }
See also: