Skip to content

Instantly share code, notes, and snippets.

Created August 26, 2020 21:03
What would you like to do?
A complete solution to the window fitting image scaling display problem in HTML
<!DOCTYPE html>
<body style="overflow:hidden; margin:0; text-align:center;">
<img src="" style="height:100vh; max-width:100%; object-fit: contain;">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment