Answers for "How do you make an image fill its container in CSS?"

1

image to fill div

.fill {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden
}
.fill img {
    flex-shrink: 0;
    min-width: 100%;
    min-height: 100%
}
Posted by: Guest on March-21-2021

Code answers related to "How do you make an image fill its container in CSS?"

Browse Popular Code Answers by Language