Answers for "how to make image with different dimensions to be of same size keeping aspect ratio using css"

CSS
3

css image fit in div with aspect ratio

img {
    width: 100%;
    height: 100%; 
    object-fit: contain;
}
Posted by: Guest on July-02-2020
0

css keep aspect ratio image

.image-full {
    background: url(...some image...) no-repeat;
    background-size: cover;
    background-position: center center;
}
Posted by: Guest on February-26-2021

Code answers related to "how to make image with different dimensions to be of same size keeping aspect ratio using css"

Browse Popular Code Answers by Language