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 id="slider"></div>
<div class="container">
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 500">
    <defs>
      <filter id="goo" color-interpolation-filters="sRGB">
        <feGaussianBlur in="SourceGraphic" stdDeviation="8" result="blur" />
        <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 31 -12" result="cm" />
      </filter> 
    </defs>
    <g id="base-lines" opacity="0.18" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="25">
      <path d="M430.5,250A55.5,55.5,0,1,1,375,194.5" />
      <path d="M470.5,250A95.5,95.5,0,1,1,375,154.5" />
      <path d="M510.5,250A135.5,135.5,0,1,1,375,114.5" />
      <path d="M550.5,250A175.5,175.5,0,1,1,375,74.5" />
      <path d="M590.5,250C590.5,369,494,465.5,375,465.5S159.5,369,159.5,250,256,34.5,375,34.5" />
    </g>
    <g id="mid-lines" opacity="0.44" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="4">
      <path d="M445,250a70,70,0,1,1-70-70" />
      <path d="M485,250A110,110,0,1,1,375,140" />
      <path d="M525,250A150,150,0,1,1,375,100" />
      <path d="M565,250c0,104.93-85.07,190-190,190S185,354.93,185,250,270.07,60,375,60" />
      <path d="M605,250c0,127-103,230-230,230S145,377,145,250,248,20,375,20" />
    </g>
    <g id="top-lines" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="4">
      <path class="line0 line" d="M375,180a70,70,0,1,0,70,70" />
      <path class="line1 line" d="M375,140A110,110,0,1,0,485,250" />
      <path class="line2 line" d="M375,100A150,150,0,1,0,525,250" />
      <path class="line3 line" d="M375,60c-104.93,0-190,85.07-190,190s85.07,190,190,190,190-85.07,190-190" />
      <path class="line4 line" d="M375,20C248,20,145,123,145,250S248,480,375,480,605,377,605,250" />
    </g>
    <g id="circles" fill="#fff" <!--filter="url(#goo)"-->>
      <circle class="circ0 circ" cx="375" cy="180" r="15" />
      <circle class="circ1 circ" cx="375" cy="140" r="15" />
      <circle class="circ2 circ" cx="375" cy="100" r="15" />
      <circle class="circ3 circ" cx="375" cy="60" r="15" />
      <circle class="circ4 circ" cx="375" cy="20" r="15" />
    </g>
    <circle id="center-circ" cx="375" cy="250" r="30.5" fill="#fff" <!--filter="url(#goo)"-->/>
  </svg>
</div>
              
            
!

CSS

              
                body {
  background-color:#4285F4;
  background: linear-gradient(to right, #ed30a0 0%,#0b86a6 100%);
}

body,
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

#slider{
  //float:left;
  width:300px;
  position:relative;
  top:8px;
}

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 750px;
  height: 500px;
}

svg {
  width: 100%;
  height: 100%;
  visibility: hidden;
}

#circ {
  fill: white;
}

#base-lines, #mid-lines, #top-lines {
  path {
    stroke: white;
  }
}

#base-lines {
  opacity: 0.18;
}

#mid-lines {
  opacity: 0.44;
}

#top-lines {
  opacity: 1;
}

              
            
!

JS

              
                TweenMax.set('svg', {
  visibility: 'visible'
});

TweenMax.set('#center-circ', {
  transformOrigin: '50% 50%'
});

TweenMax.set(['#base-lines path','#mid-lines path','#top-lines path'], {
  drawSVG:'0% 0%'
});

TweenMax.set('.circ', {
  //opacity: 0
})

TweenMax.set('.circ', {xPercent:-50, yPercent:-50});

var tl = new TimelineMax({repeat:-1, repeatDelay:2});
var baseTime = 0.7;
var percs = [53, 60, 66, 85, 100];
var linesPerc = ["0% "+percs[0]+"%", "0% "+percs[1]+"%", "0% "+percs[2]+"%", "0% "+percs[3]+"%", "0% "+percs[4]+"%"];


var bezTimeline = new TimelineLite({paused:true});
bezTimeline.staggerTo(".circ", 2, {
  cycle: {
    bezier: function(i) { 
      var line = ".line"+[i];
      var circ = ".circ"+[i];
      var motionPath = MorphSVGPlugin.pathDataToBezier(line, {align:circ});
      return {values:motionPath, type:"cubic"};
    }
  },
  ease:Power4.easeOut
}, 0.15);


tl.fromTo('#center-circ', baseTime*1, { scale: 0 }, { 
    scale: 1,
    delay: 0.5,
    ease: Elastic.easeOut.config(0.5, 0.4)
}, 0.15)


//control the progress of the bezierTimeline
tl.to(bezTimeline, 1, {progress:0.2, ease:Back.easeOut})
  .to(bezTimeline, 1, {progress:0.4, ease:Back.easeOut}, "+=1")
  .to(bezTimeline, 1, {progress:1}, "+=1")












              
            
!
999px

Console