JSFiddle - React, Tailwind, and code Playground

by Prithviraj mitra

HTML

<div class="image_container">
  <figure><img alt="" src="http://dummyimage.com/279x279/000000/fff"></figure>
  <div class="bio_overlay"></div>
</div>

CSS

.image_container {
  position: relative;
  width:279px;
  height:279px;
}

.image_container img {
  display: block;
  position: relative;
}

.bio_overlay {
  background: #ffc27f;
  bottom: 0;
  height: 100%;
  left: 2.5rem;
  opacity: 0.4;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity 0.5s ease-in-out 0s;
  visibility: hidden;
  width: 100%;
}

.image_container:hover  .bio_overlay {
    visibility: visible;
}