JSFiddle - React, Tailwind, and code Playground

HTML

<article class='container'>
  <div class='frontDiv'>
    <div class='frontImg f1'></div>
    <div class='frontImg f2'></div>
  </div>
</article>

CSS

.container {
  position: relative;
  margin-top : 10px;
  width : 500px;
  height: 330px;
   -webkit-perspective: 1500px;
  box-shadow: 3px 3px 13px #AAA;
}

.frontDiv {
  padding: 20px;
  width: 300px;
  height: 330px;  
}

.frontImg {
  position: absolute;
  border:1px solid;
  height : 281px;
  width : 225px;  
  overflow: hidden;
  background-image: url('iday.jpg');
  transition:all 1s ease-in-out;
  -webkit-transition:all 1s ease-in-out;
  backface-visibility : hidden;
   -webkit-transform-origin:0% 0%; 
}

.f1 {
  top: 20px;
  left:20px;
  background-position: 0px 0px;
}


.f2 {
  top: 20px;
  left:245px;
  background-position: -225px 0px;
}

.frontDiv:hover .f2
{ 
 -webkit-transform : rotateY(-180deg);
 }