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

              
                <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000">
  <g id="back">
    <rect width="500" height="500" fill="#fccb7d"/>
  </g>
  <g id="base">
    <rect x="100" y="100" width="300" height="250" fill="#fff" stroke="#000" stroke-miterlimit="10" stroke-width="2.83"/>
    <line x1="250" y1="100.5" x2="250" y2="350" fill="none" stroke="#b3b3b3" stroke-miterlimit="10" stroke-width="2.83"/>
    <line x1="99.5" y1="250.5" x2="399.5" y2="250.5" fill="none" stroke="#b3b3b3" stroke-miterlimit="10" stroke-width="2.83"/>
  </g>
  <g id="fold1">
    <polygon points="350 350 250 350 150.5 350 100 350 100 400 149.75 400 150.5 400 250 400 350 400 350.37 400 400 400 400 350 350 350" fill="#fff" stroke="#000" stroke-miterlimit="10" stroke-width="2.83"/>
    <line x1="250" y1="350" x2="250" y2="400" fill="none" stroke="#ccc" stroke-miterlimit="10" stroke-width="2.83"/>
    <g>
      <line x1="100" y1="350" x2="106" y2="350" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="2.83"/>
      <line x1="120.79" y1="350" x2="386.6" y2="350" fill="none" stroke="#fff" stroke-dasharray="0 0 12.53 14.79" stroke-miterlimit="10" stroke-width="2.83"/>
      <line x1="394" y1="350" x2="400" y2="350" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="2.83"/>
    </g>
  </g>
</svg>
              
            
!

CSS

              
                
              
            
!

JS

              
                

const tl = gsap.timeline({})

tl.to("#fold1", {
  // rotationY: 90,
  // svgOrigin: "300 300",
  scaleY: -1,
  ease: Cubic.easeOut
});

tl.to("#fold1", {
  skewX: 10,
  ease: Cubic.easeOut
}, "-=0.4");

tl.to("#fold1", {
  duration: 0.3,
  skewX: 0,
  ease: Cubic.easeOut
});
              
            
!
999px

Console