* {
  margin: 0px;
  padding: 0px;
}

body {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background-color: #ffffe4;
}

.heart {
  position: relative;
  width: 100px;
  height: 100px;
  animation-name: heartbeat;
  animation-duration: 1.5s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.4);
  }
  40% {
    transform: scale(1.2);
  }
  60% {
    transform: scale(1.5);
  }
  80% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.heart span {
  position: absolute;
  background-color: red;
}

.heart span:nth-child(1) {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  left: -31%;
  top: -31%;
}

.heart span:nth-child(2) {
  width: 100px;
  height: 100px;
  transform: rotate(45deg);
}

.heart span:nth-child(3) {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  left: 31%;
  top: -31%;
}
