JSFiddle - React, Tailwind, and code Playground

by Daniel Pietrasik

HTML

<div class="book">
  <div class="page"></div>
  <div class="page"></div>
  <div class="page"></div>
</div>
<div class="text">Wczytywanie</div>

CSS

body {
  padding-top: 3%;
  background-color: #5c5c5b;
}

.book {
  margin: auto;
  border: 3px solid #ffe600;
  background: #5c5c5b;
  width: 60px;
  height: 50px;
  perspective: 170px;
}

.book .page {
  display: block;
  width: 30px;
  height: 50px;
  border: 3px solid #ffe600;
  border-left: 1px solid #ffe600;
  margin: 0;
  position: absolute;
  right: -3px;
  top: -3px;
  transform-style: preserve-3d;
  transform-origin: left center;
}

.book .page:nth-child(1) {
  animation: animation-page-move 2s linear 1.1s infinite;
}

.book .page:nth-child(2) {
  animation: animation-page-move 2s linear .8s infinite;
}

.book .page:nth-child(3) {
  animation: animation-page-move 2s linear .5s infinite;
}

.text {
  margin-top: 15px;
  color: #ffe600;
  text-align: center;
  position: relative;
}

.text:after {
  content: "";
  position: absolute;
  animation: animation-dots 1.5s linear infinite;
}

@keyframes animation-page-move {
  0% {
    transform: rotateY(0deg);
  }

  20% {
    background: #bbb;
  }

  40% {
    transform: rotateY(-180deg);
  }

  80% {
    background: transparent;
  }

  100% {
    transform: rotateY(-180deg);
  }
}

@keyframes animation-dots {
  0% {
    content: "";
  }

  25% {
    content: ".";
  }

  50% {
    content: "..";
  }

  75% {
    content: "...";
  }
}