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

              
                <div class="wrapper">
  <div id="one"></div>
</div>

<div class="blobsWrapper">
  <svg  id="theBlobs" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 400">
    <g id="Blobs" fill="#009000" transform="translate(0 -652.362)">
      <path id="Blob1" d="M191.565 102.606c175.492 18.55 96.557-26.859 168.79-28.132 82.684-1.457 184.51-52.023 223.716 56.264C603.11 183.322 686.257 207.093 663.108 258c-37.22 81.857-157.93-1.208-243.81 25.453-69.394 21.543-231.505 51.453-274.62 14.735-42.53-36.218-8.666-201.455 46.887-195.583z" transform="translate(0 652.362)"/>
      <path id="Blob2" d="M282.658 212.454c3.371-45.015-83.009-83.732-58.943-121.923 57.85-91.803 221.964-120.939 325.526 1.34 41.665 49.193-137.336 77.835-131.282 142.017 4.746 50.308 139.32 42.676 121.905 90.112-36.708 99.99-272.312 74.388-318.828-21.434-15.891-32.735 58.905-53.824 61.622-90.112z" transform="translate(0 652.362)"/>
      <path id="Blob3" d="M57.603 177.624C70.718 103.34 171.996 72.11 243.81 49.021c96.089-30.892 215.627-56.317 302.752-5.358 77.952 45.594 176.732 162.039 128.603 238.451-54.562 86.624-207.127-38.222-306.771-14.736-65.772 15.503-110.907 113.976-176.83 99.132-37.622-8.472-44.619-62.914-66.928-94.37-22.345-31.505-73.748-56.48-67.033-94.516z" transform="translate(0 652.362)"/>
    </g>
  </svg>
</div>
              
            
!

CSS

              
                
.wrapper{
  width: 400px;
  height:100px;
  background:grey;
}
#one{
  width:100px;
  height:100px;
  background:green;
}

.blobsWrapper {
  position:fixed;
  top: 110px;
  display: flex;
  justify-content: center;
  height: 100vh;
  width: 100vw;
  margin:0;
}
#theBlobs {
  position:absolute;
  width: 60vw;
  overflow:visible;
}
#Blob2, #Blob3{
    visibility:hidden;
  }
              
            
!

JS

              
                var immediateRender = false;
// https://greensock.com/immediateRender

var theTween = TweenMax.to('#one',1,{x:300, ease: Sine.easeOut,paused:true});

function tweening (time, start, end) {
  var tl = new TimelineLite()
  .fromTo(theTween, time, {progress:start}, {progress:end, ease: Sine.easeOut, immediateRender:immediateRender})
  return tl;
}

var main = new TimelineMax({delay:2, ease: Sine.easeOut})
  .set('#one',{x:0})
  .add(tweening(2,0,1))
  .add(tweening(1,1,0.5), "+=1")
  .add(tweening(3,0,0.5), "+=1")
  .add(tweening(1,1,0.5), "+=1")

// ==================================================================
var blobsTween = TweenMax.to("#Blob1", 1, { morphSVG: "#Blob3",paused:true}) 

function blobTweening (time, start, end) {
  var tl = new TimelineLite()
  .fromTo(blobsTween, time, {progress:start}, {progress:end, ease: Sine.easeOut, immediateRender:immediateRender})
  return tl;
}

var mainBlob = new TimelineMax({delay:2, ease: Sine.easeOut})
  .add(blobTweening(2,0,1))
  .add(blobTweening(1,1,0.5), "+=1")
  .add(blobTweening(3,0,0.5), "+=1")
  .add(blobTweening(1,1,0.5), "+=1")
              
            
!
999px

Console