<main>
    <div class="card">mkimq</div>
</main>
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  background: #34495e;
  display: flex;
  justify-content: center;
  align-items: center;
}

main {
  width: 300px;
  height: 200px;
  transform-style: preserve-3d;
  transform: perspective(600px) rotateX(35deg) rotateY(15deg);
}

.card {
  width: 300px;
  height: 200px;
  background: #e67e22;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3em;
  color: whitesmoke;
  position: relative;

}

.card::before,
.card::after {
  transition: 1s;
  background: #e74c3c;
  line-height: 4em;
}

.card::before {
  content: '新年';
  width: 150px;
  height: 100%;
  left: 0px;
  top: 0;
  text-align: right;
  position: absolute;
  transform-origin: left bottom;
}

.card::after {
  content: '快乐';
  width: 150px;
  height: 100%;
  left: 150px;
  top: 0;
  position: absolute;
  transform-origin: right bottom;
}

.card:hover::before {
  transform: rotateY(-179deg);
}

.card:hover::after {
  transform: rotateY(179deg);
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.