Skip to content

Instantly share code, notes, and snippets.

@eyaler
Created Aug 26, 2020
Embed
What would you like to do?
A complete solution to the window fitting image scaling display problem in HTML
<!DOCTYPE html>
<html>
<body style="overflow:hidden; margin:0; text-align:center;">
<img src="https://file-examples-com.github.io/uploads/2017/10/file_example_JPG_2500kB.jpg" style="height:100vh; max-width:100%; object-fit: contain;">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment