<input type='checkbox' id='run' />

<svg viewBox='-512 -512 1024 1024'>
  <defs>
    <polygon id='star' points='250,0 64,64 0,250 -64,64 -250,0 -64,-64 0,-250 64,-64'/>
  </defs>

  <g>
    <use xlink:href='#star'/>
    <use xlink:href='#star'/>
    <use xlink:href='#star'/>
  </g>
</svg>

<label for='run'>play</label>
@import "compass/css3";

html { overflow: hidden; }

body { margin: 0; }

svg {
  display: block;
  margin: 0 auto;
  width: 100vmin; height: 100vmin;
}

use {
  animation: ani 4s linear infinite;
}

@keyframes ani {
  0% { transform: scale(0); }
  25% { transform: scale(1); }
}


/* This is just so the animation only runs on click */

#run {
  position: absolute;
  left: -100vmax;
}

label[for='run'] {
  position: absolute;
  top: 50%; left: 50%;
  border: solid 50vmin;
  width: 2em; height: 2em;
  transform: translate(-50%, -50%);
  color: transparent;
  text-align: center;
  cursor: pointer;
  transition: .7s;
  
  &:before {
    position: absolute;
    left: 50%;
    width: 3.5em; height: 4em;
    transform: translate(-50%, -100%);
    background: 
      linear-gradient(to right bottom, 
        orange 49%, transparent 51%) 0 2em, 
      linear-gradient(to right top, 
        orange 49%, transparent 51%);
    background-repeat: no-repeat;
    background-size: 100% 50%;
    content: '';
  }
}

#run ~ svg use {
  animation-play-state: paused;
}

#run:checked ~ svg use {
  animation-play-state: running;
}

#run:checked ~ label { opacity: .001; }

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.