Pen Settings



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


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


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.


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.


                <svg height="200px" xmlns= viewBox="0 0 100 100">
  <circle cx=10 cy=10 r="5" class="marker1"/>
  <circle cx=10 cy=90 r="5" class="marker2"/>
  <circle cx=90 cy=90 r="5" class="marker3"/>
  <circle cx=90 cy=10 r="5" class="marker4"/>
  <circle cx=10 cy=10 r="2" id="point"/>


                svg { background-color: #EEE; }
.marker1 { fill: red; }
.marker2 { fill: green; }
.marker3 { fill: blue; }
.marker4 { fill: yellow; }


                var bezier_duration = 3;
var bezier_path = [
  {x:0, y:0, progress:0},
  {x:0, y:80, progress:0.1},
  {x:80, y:80, progress:0.5},
  {x:80, y:0, progress:0.6},
  {x:0, y:0, progress:1}
var bezier_path2 = [{progress:0},{progress:0.1},{progress:0.5},{progress:0.6},{progress:1}];

// Required behaviour is explained below:
// - The black dot should move between the four coloured dots in a smooth path in 3 seconds.
// - The vertical moves (red to green, blue to yellow) should be fast, each lasting 10% of the total duration, as indicated by 'progress' in 'bezier_path'.
// - The horizontal moves (green to blue, yellow to red) should be slow, each lasting 40% of the total duration, as indicated by 'progress' in 'bezier_path'.
// - The animation should not suddenly change speeds between moves, but rather smoothly accelerate/decelerate between speeds.
// - Please note that this is only an example and the contents of 'bezier_path' is arbitrary.


var tl = new TimelineMax({
  repeat: -1,
  yoyo: true
var tl_nested = new TimelineMax();

tl_nested.pause().to($('#point'), 1, { bezier: {
  type: 'thru',
  values: bezier_path,
  curviness: 1,
  correlate: 'x,y,progress'
}, ease: Linear.easeNone }, 0);, bezier_duration, { bezier: {
  type: 'thru',
  values: bezier_path, // Works with bezier_path2 but tweens linearly.
  curviness: 1,
  correlate: 'x,y,progress'
}, ease: Linear.easeNone });