Css cover image from src

- Posted in CSS by
.class-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    filter: brightness(50%);
}

img {
    vertical-align: middle;
    max-width: 100%;
}

<img class="class-img" src="img.jpg"/>
Tags: