JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
</head>
<body>
<div class="works">
<div class="works-example-wrapper">
<div class="work-example">
<a href="#" class="work-example-link">
<img src="http://limonos.ru/uploads/posts/2015-01/1422023415605s.jpeg" alt="" class="work-example-img">
</a>
</div>
<div class="work-example">
<a href="#" class="work-example-link">
<img src="https://2krota.ru/wp-content/uploads/2018/10/356798-sepik-1-768x512.jpg" alt="" class="work-example-img">
</a>
</div>
<div class="work-example">
<a href="#" class="work-example-link">
<img src="http://limonos.ru/uploads/posts/2015-01/1422023415605s.jpeg" alt="" class="work-example-img">
</a>
</div>
<div class="work-example">
<a href="#" class="work-example-link">
<img src="https://2krota.ru/wp-content/uploads/2018/10/356798-sepik-1-768x512.jpg" alt="" class="work-example-img">
</a>
</div>
</div>
</div>
</body>
</html>
CSS
.works-example-wrapper {
display: flex;
flex-wrap: wrap;
}
.work-example {
flex: 0 0 100%;
}
@media (min-width: 576px) {
.work-example {
flex: 0 0 50%;
}
}
@media (min-width: 768px) {
.work-example {
flex: 0 0 25%;
}
}
.work-example-img {
width: 100%;
height: 300px;
object-fit: cover;
}
.work-example {
position: relative;
}
.work-example:hover {
cursor: pointer;
}
.work-example::before {
transition: all 1s ease;
}
.work-example:hover::before {
content: '';
text-align: center;
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url('https://image.flaticon.com/icons/svg/159/159604.svg') no-repeat center center;
background-color: #252525;
background-size: 48px;
opacity: 0.85;
}