P
P
Psoriaz2021-07-14 19:34:10
css
Psoriaz, 2021-07-14 19:34:10

How to make a mask on an image on hover so that it covers only the image without margins?

I have a list of pictures. It is necessary that when you hover over the image, it is covered with a translucent mask. I made the mask appear from below, but in addition to the picture, it closes the margins, which I don’t need in principle. How can this be corrected?

Code: https://codepen.io/pen/?template=jOmyRrE

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-07-14
@Psoriaz

.works__item {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 65px;
}

.work-img {
    width: 100%;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question