JSFiddle - React, Tailwind, and code Playground

by phsiao2000

HTML

<div class="wrap">
    <div></div>
    <figcaption>
     <h3>Homecoming Sunday!
      <span>Join us for the beginning of a new program year. Sunday School. Youth Group, Coffee & Treats, Evensong and even Bingo!</span>
     </h3>
    </figcaption>
</div>
<div id='cap'>
hover over image
</div>

CSS

html, body {
    height: 100%;
}

div.wrap {
    height: 300px;
    width: 300px;
    overflow: hidden;
    position: relative;
    margin:40px;
}
div#cap {
  margin-left:40px;
 font-family: 'futura', Helvetica, Arial;
 font-size:16px;
  text-transform: uppercase;
  font-weight: 100;
  letter-spacing:3px!important;
  text-align:center;
  width: 300px;
}
div.wrap figcaption {
  display: block;
  opacity:1;
  color:black;
  text-align:center;
  top: 50%;
  transform: translateY(-50%);
  position: relative;
  margin: 0;
  font-size: 1em;
   opacity: 0;
    text-align: center;
    height: 50%;
    width: calc(100% - 0px);
    left: 0px;
    position: absolute;
}
div.wrap figcaption h3 span {
  font-family: garamond!important;
    letter-spacing:0px!important;
  text-transform: none!important;

  display: inline-block;
    width: 80%;
    line-height: 20px!important;
  margin-top:10px;
}
div.wrap figcaption h3 {
 font-family: 'futura', Helvetica, Arial;
  text-transform: uppercase;
  font-weight: 100;
  letter-spacing:3px!important;

  opacity:1;
    font-size: 16px;
    line-height: 25px;
    margin: 0;
    width: 100%;
    padding: 0 0px;
    text-align: center;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    position: relative;
}

div.wrap:hover > figcaption {
  opacity: 1;
  transition: all .5s ease;
}
div.wrap > div {
    position: absolute;
    height: 100%;
    width: 100%;
    -moz-transition: all .5s;
    -webkit-transition: all .5s;
    transition: all 1s ease;
    -moz-transform: scale(1,1);
    -webkit-transform: scale(1,1);
    transform: scale(1,1);
    background-image: url('https://stmarks.cdn.prismic.io/stmarks/50f6081a0032cf1a2c175aa38e50c35069a3a34a__mg_9618.jpg');
    -moz-background-size: cover;
    -webkit-background-size: cover;
    background-size: cover;
    z-index: -1;
}
/*http://www.themezaa.com/html/brando/personal.html*/
div.wrap:hover > div {
   ...