JSFiddle - React, Tailwind, and code Playground

by mungbeans

HTML

<!DOCTYPE html> 
<html>
<head>
  <meta name="viewport" content="user-scalable=no, width=device-width" />
  <title>Title</title>
</head>
<body>        
    <ul id = "list">
        <li>
            <div id="card-container">
              <div id="card">
                <div class="front">
                   <img src="Jimmy_Cliff_Rebirth.jpg" />
                </div>
                <div class="back"> the back</div>
              </div>  
            </div>
      </li>
    </ul>
</body>
</html>

CSS

body {
    font-family: Helvetica; 
    margin: 0;              
    padding: 0;
}

#card {
    -webkit-transform-style: preserve-3d;
    -webkit-perspective: 1000;
    width: 320px;
    height: 80px;
    position: relative;
}   
.back, .front {
    position: absolute;
    -webkit-backface-visibility: hidden;
    -webkit-transition: -webkit-transform 1s ease-in;
    width: 100%;
    height: 100%;   
    font-weight: bold;
}
.back {
    -webkit-transform: rotateX(180deg);
    background: #ffffff;
    overflow: hidden;
}   
.front {
    background: #7f37c2;
}
#card-container {
    display: inline-block;
    text-align: justify;
}   
#card-container:hover .back {   
    -webkit-transform: rotateX(0deg);
}
#card-container:hover .front {      
    -webkit-transform: rotateX(-180deg);
}