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

Auto Save

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 class="track" viewBox="0 0 451 379" width="451px" height="379px">
  <path fill="none" stroke="#ffffff" stroke-width="1" d="M0,380 C9.32293455,260.130586 35.1510596,182.38319 77.484375,146.757812 C140.984348,93.3197459 266.91385,262.809311 332.683594,240.753906 C398.453337,218.698502 450.023437,1.28465307 450.023437,1.28465307"></path>
</svg>

<div class="box one"></div>
<div class="box two"></div>
<div class="box three"></div>
              
            
!

CSS

              
                body {
  background-color: #333;
  padding: 0 4em;
  width: 100%;
}

svg, .box {
  position: absolute;
}

.box {
  height: 50px;
  width: 50px;
  offset-path: path("M0,380 C9.32293455,260.130586 35.1510596,182.38319 77.484375,146.757812 C140.984348,93.3197459 266.91385,262.809311 332.683594,240.753906 C398.453337,218.698502 450.023437,1.28465307 450.023437,1.28465307");
  offset-rotate: 0;
  animation: move 4s 0ms infinite alternate ease-in-out;
}

.one {
  background-color: orange;
  offset-anchor: center center;
}

.two {
  background-color: red;
  offset-anchor: left top;
}

.three {
  background-color: blue;
  offset-anchor: right bottom;
}



@keyframes move {
  100% {
    offset-distance: 100%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console