JSFiddle - React, Tailwind, and code Playground

by seevis

HTML

<table>
  <tr>
    <td>
      <div class="berel">
        <img src="https://via.placeholder.com/200x320" class="imgberel">
        <div class="oerel"> <div class="imieberel">
              Imię i nazwisko
            </div>
          <div class="txtberel">
           Opis 
          </div>
        </div>
      </div>
    </td>
    
    <td> <div class="berel">
        <img src="https://via.placeholder.com/200x320" class="imgberel">
        <div class="oerel"><div class="imieberel">
              Imię i nazwisko
            </div>
          <div class="txtberel">
            Opis
          </div>
        </div>
      </div></td>
      
          <td> <div class="berel">
        <img src="https://via.placeholder.com/200x320" class="imgberel">
        <div class="oerel"><div class="imieberel">
Imię i nazwisko          </div>
          <div class="txtberel">
            Opis
          </div>
        </div>
      </div></td>
  </tr>
</table>

CSS

.berel {
  position: relative;
  width: 150px;
  border: 4px solid #7a4f7a;
}

.imgberel {
  display: block;
  width: 150px;
  height: auto;
}

.oerel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  overflow-y: auto;
  background-color: #242b2e;
  transition: 0.5s ease;
}

.berel:hover .oerel {
  opacity: 0.9;
}

.imieberel {
  text-align: center;
  letter-spacing: 2px;
  font-size: 12px;
  color: #33999e;
  font-family: 'Times New Roman', serif;
  padding: 2px;
  margin: 2px;
}
.txtberel {
  position: absolute;
  color: white;
  font-size: 9px;
  text-align: justify;
  padding: 5px;
  font-family: 'Verdana', serif;
}