Created
August 26, 2020 21:03
-
-
Save eyaler/7f4869c68d0d6f6c11d627cea4e4f1c6 to your computer and use it in GitHub Desktop.
A complete solution to the window fitting image scaling display problem in HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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