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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 viewBox="0 0 1400 3900" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5"><path d="M1225 25v550c0 50-50 100-100 100h-100c-50 0-100 50-100 100v400c0 50-50 100-100 100H325c-50 0-100 50-100 100v300c0 50 50 100 100 100h350c37.165 0 100 50 100 100v100c0 50-50 100-100 100H475c-50 0-100 50-100 100v100c0 50-50 100-100 100H175c-50 0-100 50-100 100v600c0 50 50 100 100 100h50c50 0 100 50 100 100v600" fill="none" stroke="#ffc233" stroke-width="50"/><path d="M1175 25v450c0 50-50 100-100 100H425c-50 0-100 50-100 100v400c0 50 50 100 100 100h500c50 0 100 50 100 100v100c0 44.415 50 100 100 100h100c52.316 0 100 50 100 100v200c0 50-50 100-100 100h-200c-50 0-100 50-100 100v200c0 50-50 100-100 100H525c-50 0-100 50-100 100v250c0 50 50 100 100 100h200c57.267 0 100 50 100 100v700c0 50-50 100-100 100H375c-50 0-100 50-100 100v150" fill="none" stroke="#f79649" stroke-width="50"/><path d="M1125 25v350c0 50-50 100-100 100H925c-50 0-100 50-100 100v200c0 50 50 100 100 100h300c50 0 100 50 100 100v500c0 50-50 100-100 100H225c-50 0-100 50-100 100v150c0 50 50 100 100 100h350c50 0 100 50 100 100v450c0 50 50 100 100 100h200c50 0 100 50 100 100v500c0 50-50 100-100 100H325c-50 0-100 50-100 100v500" fill="none" stroke="#f36652" stroke-width="50"/><path d="M1075 25v250c0 50-50 100-100 100H275c-50 0-100 50-100 100v400c0 50 50 100 100 100h400c50 0 100 50 100 100v600c0 50 50 100 100 100h100c50 0 100 50 100 100 0 5.947 3.883 63.273 3.883 150 0 50 46.117 100 96.117 100h100c50 0 100 50 100 100v700c0 50-50 100-100 100H275c-50 0-100 50-100 100v750" fill="none" stroke="#a17398" stroke-width="50"/><path d="M1025 25v150c0 50-50 100-100 100H725c-50 0-100 50-100 100v300c0 50-50 100-100 100H125c-50 0-100 50-100 100v500c0 50 50 100 100 100h300c50 0 100 50 100 100v800c0 66.541 50 100 100 100h500c50 0 100 50 100 100v200c0 50-50 100-100 100H625c-50 0-100 50-100 100v400c0 50-50 100-100 100H225c-50 0-100 50-100 100v300" fill="none" stroke="#3d88b0" stroke-width="50"/></svg>
              
            
!

CSS

              
                body{
  color: #231F20;
  background-color: #EFE6DF;
}

path {
  stroke-dasharray: 7150;
  stroke-dashoffset: 7150;
}

svg{
  width: 90vw;
  margin: 5vw 0 15vw 5vw;
}


              
            
!

JS

              
                const stripes = document.getElementsByTagName("path");

function scrollChanged(){
  for(var i = 0;i<stripes.length;i++){
    stripes[i].style.strokeDashoffset = 7149*(1-(state.scroll.top/(state.size.docY - state.size.y)));
  }
}

const { watchViewport } = tornis;
const { getViewportState } = tornis;

const updateValues = ({ size, scroll, mouse, orientation }) => {
  state = getViewportState();
  if (scroll.changed) {
    scrollChanged();
  }
};

watchViewport(updateValues);


              
            
!
999px

Console