Edit in JSRUN

console 命令行工具 X clear

                    
>
console
<div class="constantine">
  <div class="eyes"></div>
  <div class="mouth"></div>
  <ul class="tentacles">
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>
* {
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  background: linear-gradient(30deg, #42586d, #6e8ba7);
  font-family: sans-serif;
}

div {
  position: absolute;
}
div::before, div::after {
  content: "";
  position: absolute;
}

.constantine {
  position: absolute;
  z-index: 2;
  width: 80px;
  height: 140px;
  top: 50%;
  left: 50%;
  background: linear-gradient(10deg, #e5405a, #e8566d);
  border-radius: 50% 50% 5px 5px;
  box-shadow: 0px 3px 20px rgba(255, 255, 255, 0.1);
  animation: constantine 2s ease-in-out infinite;
}
.constantine .eyes {
  width: 42px;
  height: 8px;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
}
.constantine .eyes::before, .constantine .eyes::after {
  width: 8px;
  height: 8px;
  background: #42586d;
  border-radius: 50%;
  animation: blink 7s linear infinite;
  animation-fill-mode: backwards;
}
.constantine .eyes::before {
  left: 0;
}
.constantine .eyes::after {
  right: 0;
}
.constantine .mouth {
  width: 12px;
  height: 12px;
  top: 109px;
  left: 50%;
  border: 3px solid transparent;
  border-right: 3px solid #42586d;
  border-bottom: 3px solid #42586d;
  border-radius: 50%;
  transform: translateX(-50%) rotate(45deg);
}
.constantine .tentacles {
  position: absolute;
  z-index: 1;
  width: 100%;
  bottom: -15px;
}
.constantine .tentacles li {
  position: absolute;
  display: block;
  z-index: 1;
  background: #e8566d;
  border-radius: 3px 3px 10px 10px;
  opacity: 0.7;
  transform-origin: 50% 0;
  animation: tentacles 2.5s ease-in-out infinite;
}
.constantine .tentacles li:nth-child(1) {
  width: 6px;
  height: 30px;
  left: 4%;
  animation-delay: 0.4s;
}
.constantine .tentacles li:nth-child(2) {
  width: 6px;
  height: 50px;
  left: 15%;
  animation-delay: 0.2s;
}
.constantine .tentacles li:nth-child(3) {
  width: 6px;
  height: 20px;
  left: 28%;
  animation-delay: 0.6s;
}
.constantine .tentacles li:nth-child(4) {
  width: 6px;
  height: 30px;
  left: 39%;
}
.constantine .tentacles li:nth-child(5) {
  width: 6px;
  height: 20px;
  left: 52%;
  animation-delay: 0.6s;
}
.constantine .tentacles li:nth-child(6) {
  width: 6px;
  height: 50px;
  left: 65%;
  animation-delay: 0.6s;
}
.constantine .tentacles li:nth-child(7) {
  width: 6px;
  height: 30px;
  left: 77%;
  animation-delay: 0.4s;
}
.constantine .tentacles li:nth-child(8) {
  width: 6px;
  height: 20px;
  left: 89%;
  animation-delay: 0.2s;
}

@keyframes constantine {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-20px);
  }
}
@keyframes tentacles {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.6);
  }
}
@keyframes blink {
  0%, 5%, 7%, 10%, 12%, 100% {
    transform: scaleY(1);
  }
  6%, 11% {
    transform: scaleY(0.2);
  }
}