<div class="p-card">
  <div class="p-card__inner">
    
    <div class="p-card__front">
      <img src="https://attadesign.co.jp/media/2019/07/illust_boy.png" alt="">
    </div>
    <div class="p-card__back">
      <img src="https://attadesign.co.jp/media/2019/07/illust_girl.png" alt="">
    </div>
    
  </div>
</div>
body{
  background: #9EDDD3;
}

.p-card{
  width: 200px;
  height: 200px;
  margin: 0.5rem auto 0;
  cursor: pointer;
}

.p-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.p-card__front,
.p-card__back {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #F1F1F1;
  border-radius: 10px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.p-card__front img,
.p-card__back img{
  width: 150px;
  height: auto;
  margin: 1.5rem auto 0;
}

.p-card__back{
  transform: rotateY(180deg);
}

.p-card:hover .p-card__inner,
.p-card:focus .p-card__inner {
  transform: rotateY(-180deg);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js