JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
  <div class="img-wrapper">
    <div class="wrp">
      <img src="https://детский-мир.net/images/paint/15518_mini.gif" alt="">
    </div>
   </div>
  <p class="text">С Днем каким-то днем</p>
</div>

CSS

.container {
  width: 300px;
  height: 600px;
  margin: 20px auto;
  border: 1px solid black;
  display: flex;
  flex-direction: column;
}

.img-wrapper {
  height: 70%;
  overflow: hidden;
  outline: 1px solid black;
}

.wrp {
  position: relative;
  height: 100%;
  transition: 1s ease-out transform;
}

.wrp::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  transition: .3s ease-out background-color;
}

.wrp:hover {
  transform: scale(1.1);
}

.wrp:hover::before {
  background-color: rgba(0, 0, 0, .5);
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: uppercase;
  font-size: 18px;
}

.