skip to Main Content

Html – Fit image on screen CSS

I want all of this sample HTML structure to fit 1 screen without scrolling, the image has to resize appropriately. But there is still scrolling. <div style="position: fixed; top:0;left:0;width:100vw;height:100vh;background:red;z-index:100000;display:flex;flex-direction:column"> <div style="background:green">aaa</div> <div style="flex-grow:1"> <img src="https://placehold.co/3200x3200" style="width: 100%; height: 100%; object-fit:…

VIEW QUESTION
Back To Top
Search