Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<svg width="270" height="270" viewBox="0 0 270 270" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="target">
<rect width="270" height="270" fill="white"/>
<circle id="background_circle" cx="134.5" cy="134.5" r="123.5" fill="#DEEFFF"/>
<path id="foot" d="M206.276 193.757C206.97 195.262 208.753 195.918 210.257 195.224C211.762 194.53 212.418 192.747 211.724 191.243L206.276 193.757ZM199.724 165.243C199.03 163.738 197.247 163.082 195.743 163.776C194.238 164.47 193.582 166.253 194.276 167.757L199.724 165.243ZM211.724 191.243L199.724 165.243L194.276 167.757L206.276 193.757L211.724 191.243Z" fill="#222630"/>
<g id="big-circle">
<path id="back" d="M170.912 73.9417L170.982 73.9559L171.054 73.9666C186.345 76.2675 196.636 86.7356 201.874 100.861C207.138 115.055 207.17 132.718 201.884 148.529C196.548 164.493 188.086 176.668 178.117 183.812C168.223 190.901 156.777 193.108 144.951 189.155C133.412 185.297 127.131 176.325 124.983 164.067C122.81 151.663 124.95 136.092 130.345 119.951C135.735 103.828 142.801 91.4991 150.175 83.6289C157.615 75.6884 164.89 72.7374 170.912 73.9417Z" fill="#C7CFDE" stroke="#222630" stroke-width="6"/>
<path id="big-circle-background" d="M194.095 139.198C185.755 170.574 161.312 191.309 139.498 185.511C117.684 179.713 106.76 149.578 115.099 118.203C123.438 86.8271 147.882 66.0921 169.696 71.8899C191.51 77.6877 202.434 107.823 194.095 139.198Z" fill="#EFF5FF"/>
<path id="big-circle-border" d="M140.179 187.903L139.295 190.241L139.442 190.297L139.595 190.333L140.179 187.903ZM168.052 72.0289L168.636 69.5982L168.052 72.0289ZM115.865 107.688C115.448 109.005 116.178 110.41 117.494 110.826C118.81 111.243 120.215 110.513 120.632 109.197L115.865 107.688ZM115.835 128.872C116.05 127.509 115.12 126.228 113.756 126.012C112.393 125.796 111.112 126.727 110.896 128.09L115.835 128.872ZM189.505 138.478C185.754 154.074 178.253 167.088 169.289 175.548C160.304 184.026 150.118 187.722 140.764 185.472L139.595 190.333C151.128 193.108 162.972 188.383 172.72 179.184C182.488 169.967 190.422 156.049 194.367 139.648L189.505 138.478ZM167.467 74.4595C176.821 76.7096 184.212 84.6336 188.358 96.2701C192.495 107.881 193.257 122.882 189.505 138.478L194.367 139.648C198.312 123.246 197.575 107.243 193.068 94.5919C188.57 81.9667 180.17 72.3725 168.636 69.5982L167.467 74.4595ZM120.632 109.197C129.461 81.298 152.318 70.8156 167.467 74.4595L168.636 69.5982C150.401 65.2119 125.309 77.8469 115.865 107.688L120.632 109.197ZM141.064 185.564C124.014 179.117 111.404 156.854 115.835 128.872L110.896 128.09C106.208 157.701 119.418 182.724 139.295 190.241L141.064 185.564Z" fill="#222630"/>
</g>
<g id="medium-circle">
<path id="medium-circle-background" d="M176.303 136.793C170.611 154.829 155.832 166.243 143.293 162.286C130.753 158.329 125.201 140.5 130.892 122.464C136.584 104.428 151.363 93.0145 163.902 96.9714C176.442 100.928 181.994 118.757 176.303 136.793Z" fill="white"/>
<path id="medium-circle-border" d="M143.5 162L142.517 164.298L142.657 164.359L142.804 164.401L143.5 162ZM162.5 96.5L163.196 94.0987L162.5 96.5ZM131.154 113.637C130.677 114.933 131.341 116.37 132.637 116.846C133.933 117.323 135.37 116.659 135.846 115.363L131.154 113.637ZM131.481 130.31C131.652 128.94 130.68 127.691 129.31 127.519C127.94 127.348 126.691 128.32 126.519 129.69L131.481 130.31ZM172.231 135.988C169.683 144.783 165.161 151.508 160.018 155.596C154.879 159.681 149.251 161.063 144.196 159.599L142.804 164.401C149.77 166.419 157.041 164.35 163.129 159.51C169.213 154.674 174.247 146.999 177.033 137.379L172.231 135.988ZM161.804 98.9013C166.712 100.323 170.626 104.878 172.68 111.712C174.722 118.504 174.781 127.185 172.231 135.988L177.033 137.379C179.818 127.767 179.821 118.097 177.468 110.272C175.128 102.488 170.31 96.1593 163.196 94.0987L161.804 98.9013ZM135.846 115.363C141.507 99.9709 153.526 96.5033 161.804 98.9013L163.196 94.0987C152.261 90.9315 137.671 95.9153 131.154 113.637L135.846 115.363ZM144.483 159.702C138.903 157.314 135.28 153.744 133.211 149.036C131.109 144.25 130.512 138.056 131.481 130.31L126.519 129.69C125.488 137.944 126.038 145.138 128.633 151.047C131.263 157.033 135.89 161.463 142.517 164.298L144.483 159.702Z" fill="#222630"/>
</g>
<g id="tiny-circle">
<path id="tiny-circke-background" d="M162.706 132.147C160.602 138.814 155.14 143.032 150.505 141.57C145.87 140.107 143.818 133.518 145.922 126.851C148.025 120.185 153.488 115.966 158.123 117.429C162.757 118.891 164.809 125.481 162.706 132.147Z" fill="#C7CFDE"/>
<path id="tiny-circke-border" d="M149.874 142.318L148.891 144.616L149.032 144.676L149.179 144.719L149.874 142.318ZM146.92 117.613C146.154 118.762 146.464 120.314 147.613 121.08C148.762 121.846 150.314 121.536 151.08 120.387L146.92 117.613ZM146.524 133.5C146.524 132.119 145.405 131 144.024 131C142.643 131 141.524 132.119 141.524 133.5L146.524 133.5ZM160.034 131.408C159.077 134.71 157.406 137.14 155.611 138.567C153.821 139.99 152.04 140.342 150.57 139.916L149.179 144.719C152.559 145.698 155.983 144.658 158.722 142.481C161.458 140.306 163.641 136.926 164.837 132.799L160.034 131.408ZM156.845 118.291C158.167 118.674 159.476 119.984 160.22 122.457C160.951 124.89 160.993 128.097 160.034 131.408L164.837 132.799C166.03 128.679 166.049 124.482 165.008 121.018C163.978 117.593 161.764 114.511 158.236 113.489L156.845 118.291ZM151.08 120.387C152.453 118.328 154.553 117.628 156.845 118.291L158.236 113.489C153.928 112.241 149.547 113.672 146.92 117.613L151.08 120.387ZM150.858 140.019C148.481 139.002 147.623 138.292 147.204 137.641C146.779 136.98 146.524 135.951 146.524 133.5L141.524 133.5C141.524 136.049 141.731 138.375 143 140.347C144.275 142.328 146.342 143.526 148.891 144.616L150.858 140.019Z" fill="#222630"/>
</g>
<g id="arrow-group">
<path id="arrow-point" d="M156.766 115.839C156.125 114.312 154.367 113.593 152.839 114.234C151.312 114.875 150.593 116.633 151.234 118.161L156.766 115.839ZM159.307 129.65L161.018 132.115C162.181 131.307 162.621 129.796 162.074 128.49L159.307 129.65ZM146.289 135.036C144.928 135.98 144.591 137.85 145.536 139.211C146.481 140.572 148.35 140.909 149.711 139.964L146.289 135.036ZM151.234 118.161L156.541 130.811L162.074 128.49L156.766 115.839L151.234 118.161ZM157.596 127.186L146.289 135.036L149.711 139.964L161.018 132.115L157.596 127.186Z" fill="#222630"/>
<g id="arrow">
<path d="M65 101.5L58 83L91 92.5L95 110L81.5 122L50 113.5L65 101.5Z" fill="#F3C074"/>
<path d="M58 83L58.8299 80.1171C57.7387 79.8029 56.5637 80.1318 55.7941 80.9668C55.0245 81.8017 54.7923 82.9996 55.1941 84.0617L58 83ZM65 101.5L66.8741 103.843C67.89 103.03 68.2663 101.655 67.8059 100.438L65 101.5ZM50 113.5L48.1259 111.157C47.2432 111.864 46.8324 113.006 47.0632 114.112C47.2939 115.219 48.1271 116.102 49.2184 116.396L50 113.5ZM81.5 122L80.7184 124.896C81.6945 125.16 82.7375 124.914 83.4931 124.242L81.5 122ZM157.113 132.366C158.696 132.856 160.376 131.97 160.866 130.387C161.356 128.804 160.47 127.124 158.887 126.634L157.113 132.366ZM91 92.5L93.9246 91.8315C93.6813 90.7672 92.8791 89.9191 91.8299 89.6171L91 92.5ZM55.1941 84.0617L62.1941 102.562L67.8059 100.438L60.8059 81.9383L55.1941 84.0617ZM63.1259 99.1574L48.1259 111.157L51.8741 115.843L66.8741 103.843L63.1259 99.1574ZM49.2184 116.396L80.7184 124.896L82.2816 119.104L50.7816 110.604L49.2184 116.396ZM83.4931 124.242L96.9931 112.242L93.0069 107.758L79.5069 119.758L83.4931 124.242ZM94.1129 112.866L157.113 132.366L158.887 126.634L95.8871 107.134L94.1129 112.866ZM57.1701 85.8829L90.1701 95.3829L91.8299 89.6171L58.8299 80.1171L57.1701 85.8829ZM88.0754 93.1685L92.0754 110.668L97.9246 109.332L93.9246 91.8315L88.0754 93.1685Z" fill="#222630"/>
</g>
<circle id="dot" cx="72" cy="97.5" r="2.5" fill="#222630"/>
<circle id="dot_2" cx="73" cy="111.5" r="2.5" fill="#222630"/>
<circle id="dot_3" cx="77" cy="104.5" r="2.5" fill="#222630"/>
<circle id="dot_4" cx="84" cy="106.5" r="2.5" fill="#222630"/>
</g>
<path id="arrow-spark-top" d="M110.952 84.4633C110.655 82.8332 109.093 81.752 107.463 82.0484C105.833 82.3448 104.752 83.9065 105.048 85.5367L110.952 84.4633ZM107.048 96.5367C107.345 98.1668 108.907 99.248 110.537 98.9516C112.167 98.6552 113.248 97.0935 112.952 95.4633L107.048 96.5367ZM105.048 85.5367L107.048 96.5367L112.952 95.4633L110.952 84.4633L105.048 85.5367Z" fill="#222630"/>
<path id="arrow-spark-bottom" d="M104.458 134.72C105.408 133.363 105.078 131.492 103.72 130.542C102.363 129.592 100.492 129.922 99.5423 131.28L104.458 134.72ZM92.5423 141.28C91.5922 142.637 91.9223 144.508 93.2796 145.458C94.637 146.408 96.5076 146.078 97.4577 144.72L92.5423 141.28ZM99.5423 131.28L92.5423 141.28L97.4577 144.72L104.458 134.72L99.5423 131.28Z" fill="#222630"/>
</g>
</svg>

<button>Shoot again!</button>

              
            
!

CSS

              
                #arrow-group { 
  transform: translate(-100%, -20%);
}

#arrow-point { 
  transform-style: preserve-3d;
  transform-box: fill-box;
}


#arrow-spark-top,
#arrow-spark-bottom {
  transform-box: fill-box;
  opacity: 0;
  transform-style: preserve-3d;
}


/* MAKE IT RUN */
.animated #arrow-group {
    animation: 1s shoot forwards;
}

.animated #arrow-point { 
    animation: .3s shooted .7s forwards;
}

.animated #arrow-spark-top,
.animated #arrow-spark-bottom {
  animation: .2s sparks .8s forwards;
}


/* ANIMATIONS */
@keyframes shoot {
  from { 
    transform: translate(-100%, -20%);
  }
  to {
    transform: translate(0);
  }
}


@keyframes shooted {
  from { 
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes sparks {
  from { 
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Just a little styles to center it  */
body { 
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  margin: 0;
  flex-direction: column;
}

button {
  border: 3px solid #FDF2E3;
  border-radius: 0; 
  cursor: pointer;
  padding: 10px 20px;
  font-size: 1rem;
}

button:hover {
  background-color: #FDF2E3;
}
              
            
!

JS

              
                (function (){
  const $el = document.querySelector('button');
  const $body = document.querySelector('body');
  
  $body.classList.add('animated')
  
  $el.addEventListener('click', () => {
    if($body.classList.contains('animated'))
      $body.classList.remove('animated')
    
    window.setTimeout(() => $body.classList.add('animated'), 100)
  })
})()
              
            
!
999px

Console