<ul>
  <li>
    <p>
      <span>5 points</span>
    </p>
  </li>
  <li>
    <p>
      <span>10 points</span>
    </p>
  </li>
  <li>
    <p>
      <span>5 points (evenodd)</span>
    </p>
  </li>
</ul>
li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(circle, hsl(343, 100%, 34%), hsl(343, 100%, 54%), hsl(343, 100%, 64%));

  -webkit-clip-path: var(--star);
  clip-path: var(--star);
}
@supports (clip-path: polygon(0% 0%, 50% 500%, 100% 0%)) {
  li::after {
    animation: draw 12000ms 0ms infinite ease-in;
  }
}
li:nth-child(1)::after {
  --star: polygon(
    50% 0%, /* top */
    21% 91%, /* bottom left */
    98% 35%, /* right */
    2% 35%, /* left */
    79% 91% /* bottom right */
  );
}
li:nth-child(1)::after {
  animation-name: draw-2;
}
li:nth-child(2) {
  --star: polygon(
    50% 0%, /* top */
    61% 35%, /* each point clockwise from top... */
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}
li:nth-child(2)::after {
  animation-name: draw-1;
}
li:nth-child(3)::after {
  --star: polygon(
    evenodd,
    50% 0%, /* top */
    21% 91%, /* bottom left */
    98% 35%, /* right */
    2% 35%, /* left */
    79% 91% /* bottom right */
  );
}
li:nth-child(3)::after {
  animation-name: draw-3;
}

li {
  width: 30vmin;
  height: 30vmin;
  margin: 1vmin;
  position: relative;
  
  --graph-color: hsl(0,0%,90%); 
  background-image: 
    repeating-linear-gradient(to right, 
      var(--graph-color) 0px, 
      var(--graph-color) 1px, 
      transparent 1px, 
      transparent 3vmin),
    repeating-linear-gradient(to bottom, 
      var(--graph-color) 0px, 
      var(--graph-color) 1px, 
      transparent 1px, 
      transparent 3vmin);
  
  border: 2px none hsl(343,0%,80%);
  box-shadow: 0px 0px 5px var(--graph-color);
  transition: box-shadow 250ms ease-in-out;
}
li:hover {
  --graph-color: hsla(0,0%,0%,0);
}

@media all and (min-aspect-ratio: 9/6) {
  li {
    width: 40vmin;
    height: 40vmin;
  }
}

em {
  color: hsl(343, 100%, 40%);
}

ul, body {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2vmin;
  overflow: hidden;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
body {
  background: hsl(183, 90%, 97.5%);
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  padding: 10%;
  width: 100%;
  height: 100%;
  line-height: 1.5;
  transform: translateY(100%);
}
span {
  display: block;
  text-align: center;
}



@keyframes draw-1 {
  0% {
    clip-path: polygon(
      50% 0%, /* top */
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%
    );
  }
  7.5% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      61% 35%,
      61% 35%,
      61% 35%,
      61% 35%,
      61% 35%,
      61% 35%,
      61% 35%,
      61% 35%
    );
  }
  15% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      98% 35%,
      98% 35%,
      98% 35%,
      98% 35%,
      98% 35%,
      98% 35%,
      98% 35%
    );
  }
  22.5% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      68% 57%,
      68% 57%,
      68% 57%,
      68% 57%,
      68% 57%,
      68% 57%,
      68% 57%
    );
  }
  30% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      68% 57%,
      79% 91%,
      79% 91%,
      79% 91%,
      79% 91%,
      79% 91%,
      79% 91%
    );
  }
  37.5% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      50% 70%,
      50% 70%,
      50% 70%,
      50% 70%
    );
  }
  45% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      21% 91%,
      21% 91%,
      21% 91%,
      21% 91%
    );
  }
  52.5% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      21% 91%,
      32% 57%,
      32% 57%,
      32% 57%
    );
  }
  60% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      21% 91%,
      32% 57%,
      2% 35%,
      2% 35%
    );
  }
  67.5%, 100% {
    clip-path: polygon(
      50% 0%, /* top */
      61% 35%, /* each point clockwise from top... */
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      21% 91%,
      32% 57%,
      2% 35%,
      39% 35%
    );
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes draw-2 {
  0% {
    clip-path: polygon(
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%
    );
  }
  7.5% {
    clip-path: polygon(
      50% 0%, /* top */
      21% 91%,
      21% 91%,
      21% 91%,
      21% 91%
    );
  }
  15% {
    clip-path: polygon(
      50% 0%, /* top */
      21% 91%, /* bottom left */
      98% 35%,
      98% 35%,
      98% 35%
    );
  }
  22.5% {
    clip-path: polygon(
      50% 0%, /* top */
      21% 91%, /* bottom left */
      98% 35%, /* right */
      2% 35%,
      2% 35%
    );
  }
  30%, 100% {
    clip-path: polygon(
      50% 0%, /* top */
      21% 91%, /* bottom left */
      98% 35%, /* right */
      2% 35%, /* left */
      79% 91% /* bottom right */
    );
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes draw-3 {
  0% {
    clip-path: polygon(
      evenodd,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%,
      50% 0%
    );
  }
  7.5% {
    clip-path: polygon(
      evenodd,
      50% 0%, /* top */
      21% 91%,
      21% 91%,
      21% 91%,
      21% 91%
    );
  }
  15% {
    clip-path: polygon(
      evenodd,
      50% 0%, /* top */
      21% 91%, /* bottom left */
      98% 35%,
      98% 35%,
      98% 35%
    );
  }
  22.5% {
    clip-path: polygon(
      evenodd,
      50% 0%, /* top */
      21% 91%, /* bottom left */
      98% 35%, /* right */
      2% 35%,
      2% 35%
    );
  }
  30%, 100% {
    clip-path: polygon(
      evenodd,
      50% 0%, /* top */
      21% 91%, /* bottom left */
      98% 35%, /* right */
      2% 35%, /* left */
      79% 91% /* bottom right */
    );
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.