Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                
<section>
  <svg viewBox="0 0 240 200"><path d="M0,0 C40,240 200,240 240,0" fill="none" stroke="lightgrey"/></svg>
  <div class="pathed auto"></div>
  <div class="pathed anchor"></div>
  <code>auto</code>
</section>

<section>
  <svg viewBox="0 0 240 200"><path d="M0,0 C40,240 200,240 240,0" fill="none" stroke="lightgrey"/></svg>
  <div class="pathed angle"></div>
  <div class="pathed anchor"></div>
  <code>45deg</code>
</section>

<section>
  <svg viewBox="0 0 240 200"><path d="M0,0 C40,240 200,240 240,0" fill="none" stroke="lightgrey"/></svg>
  <div class="pathed auto angle"></div>
  <div class="pathed anchor"></div>
  <code>auto 45deg</code>
</section>
              
            
!

CSS

              
                section {
  width: 244px;
  height: 200px;
  border: 2px dashed lightgrey
}
body {
  display: flex;
  padding: 10px;
  flex-wrap: wrap;
  gap: 30px;
  margin: 0;
  height: 100vh;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

div {
  width: 50px;
  height: 50px;
  border: 1px solid hsl(343,100%,58%,.3);
  border-right: 5px solid hsl(343,100%,58%);
  background: hsla(343,100%,58%,var(--opacity,.3));
  display: flex;
  justify-content:center;
  align-items: center;
  font-family: monospace, sans-serif;
}

.pathed {
  offset-path: path('M0,0 C40,240 200,240 240,0');
  position: absolute;
  animation:
    distance 4000ms infinite alternate ease-in-out;
}
.auto {
  offset-rotate: auto;
}
.angle {
  offset-rotate: 45deg;
}
.auto.angle {
  offset-rotate: auto 45deg;
}
@keyframes distance {
  100% {
    offset-distance: 100%;
  }
}
code {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  text-align: center;
  line-height: 1.5; 
}
section {
  position: relative;
}

* {
  box-sizing: border-box;
}

svg {
  position: absolute;
  opacity: .333;
  stroke-width: 2px;
}
.anchor {
  border-radius: 50%;
  border: none;
  width: 4px;
  height: 4px;
  --opacity: 1;
}

              
            
!

JS

              
                
              
            
!
999px

Console