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.


                <div id="block1" class="wrapper">
<div id="trigger1" class="spacer s0"></div>
<svg class="svg" fill="none" width="166px" height="103px" version="1.1" xmlns="">
<path style="stroke-linecap: round; stroke-linejoin: round;" fill="none" stroke="#fff" stroke-width="10" id="path1" class="st0" d="M0.4998,85.646 C0.8268,58.644 14.6698,32.141 36.6428,16.445 C58.6158,0.749 88.1768,-3.751 113.8248,4.695 C129.5658,9.879 144.6538,20.971 148.8948,36.993"></path>
<path style="stroke-linecap: round; stroke-linejoin: round;" fill="none" stroke="#fff" stroke-width="10" id="path2" class="st0" d="M103.1082,41.6729 C105.5462,53.1359 101.5642,65.6709 93.2102,73.8889 C84.8542,82.1069 72.4582,85.8819 60.8772,84.0849 C53.4822,82.9359 46.4382,79.6209 40.8392,74.6549"></path>

<div id="block2" class="wrapper">
<div id="trigger2" class="spacer s0"></div>
<svg x="0" y="0" class="svg" width="126px" height="121px" version="1.1" xmlns="">
<rect id="theSquare" x="0" y="0" width="126" height="121" fill="#000" />
  <path style="stroke-linecap: round; stroke-linejoin: round;" fill="none" stroke="#fff" stroke-width="10" id="path3" class="st0" d="M374.856,325.739 C400.108,325.97 425.359,326.203 450.61,326.434 C453.161,326.457 455.949,326.401 457.905,324.764 C460.26,322.792 460.515,319.327 460.589,316.256 C461.266,287.983 461.943,259.709 462.621,231.436 C462.661,229.761 462.682,228.006 461.914,226.519 C460.132,223.073 455.367,222.864 451.497,223.127 C423.019,225.059 394.395,222.943 365.917,224.875 C363.837,225.016 361.574,225.235 360.069,226.678 C358.441,228.239 358.223,230.723 358.105,232.976 C356.749,258.957 356.609,262.601 355.253,288.582">

<div id="block3" class="wrapper"> 


                body { 
  background: #000; 

.svg { 
  overflow: visible !important;

.wrapper {
  height: 500px;
  width: 100%;
  display: flex; 
  align-items: center;
  justify-content: center;

#block1 {
  background: #5A3A95;

#block2 {
  background: #F2E322;

#block3 { 
  background: #6B9E4D;

.spacer.s0 {
	min-height: 1px;
.spacer.s1 {
	min-height: 100px;
.spacer.s2 {
	min-height: 200px;
.spacer.s3 {
	min-height: 300px;
.spacer.s4 {
	min-height: 400px;
.spacer.s5 {
	min-height: 500px;
.spacer.s6 {
	min-height: 600px;
.spacer.s7 {
	min-height: 700px;
.spacer.s8 {
	min-height: 800px;
.spacer.s9 {
	min-height: 900px;
.spacer.s10 {
	min-height: 1000px;
.spacer.s_viewport {
	min-height: 100%;


                TweenMax.set("#path3", {x:-348, y:-215});

function pathPrepare ($el) {
var lineLength = $el[0].getTotalLength();
$el.css("stroke-dasharray", lineLength);
$el.css("stroke-dashoffset", lineLength);

// init controller
var controller = new ScrollMagic.Controller();

// Purple path variables
var $path1 = $("path#path1");
var $path2 = $("path#path2");

// Purple SVG prepare

// Purple tween
var tween = new TimelineMax()
.add($path1, 0.7, {strokeDashoffset: 0, ease:Linear.easeNone}))
.add($path2, 0.3, {strokeDashoffset: 0, ease:Linear.easeNone}))

// Purple scene
var scene = new ScrollMagic.Scene({triggerElement: "#trigger1", duration: 100, tweenChanges: true})
.addIndicators() // add indicators (requires plugin)

// Yellow path variable
var $path3 = $("path#path3");

// Yellow SVG prepare

// Yellow tween
var tween2 = new TimelineMax()
.add($path3, 1, {strokeDashoffset: 0, ease:Linear.easeNone}))

// Yellow scene
var scene2 = new ScrollMagic.Scene({triggerElement: "#trigger2", duration: 100, tweenChanges: false})
.addIndicators() // add indicators (requires plugin)