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

              
                <!--<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="669.109px" height="1167.969px" viewBox="0 0 669.109 1167.969" enable-background="new 0 0 669.109 1167.969"
	 xml:space="preserve">
<polyline fill="none" id="line1" stroke="#1E1E1E" stroke-width="3" stroke-miterlimit="10" points="585.205,189.985 585.205,189.985 
	585.205,183.985 585.205,176.985 481.205,174.985 78.904,175.487 78.904,264.424 78.904,445.985 78.904,773.985 590.205,773.985 
	585.205,189.985 "/>
</svg>-->
<div id="dot"></div>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="-100px" y="-200px"
	 width="100%" height="1102px">
<polyline fill="none" id="line1" stroke="#1E1E1E" stroke-width="3" stroke-miterlimit="10" points="431.765,160.979 431.765,160.979 
	431.765,158.765 431.765,156.182 391.43,155.445 235.403,155.63 235.403,188.443 235.403,255.43 235.403,376.445 433.705,376.445 
	431.765,160.979 "/>
<polyline fill="none" id="line2" stroke="#1E1E1E" stroke-width="3" stroke-miterlimit="10" points="432.602,253.965 606.054,255.43 
	621.054,255.43 654.054,255.485 687.054,256.485 788.054,255.485 859.054,253.965 859.054,253.965 884.054,253.965 926.054,253.965 
	951.054,253.965 "/>
<polyline fill="none" id="line3" stroke="#1E1E1E" stroke-width="3" stroke-miterlimit="10" points="951.167,255.916 954.526,366.385 
	959.55,367.226 959.55,367.226 993.396,366.3 1149.417,364.778 1149.135,331.967 1148.56,264.981 1147.523,143.971 949.229,145.671 
	951.167,255.916 "/>
</svg>
              
            
!

CSS

              
                #Layer_1 polyline {
  visibility: hidden;
}

#Layer_1 {
  width: 100%;
  display:block;
  position: absolute;
  top: -220px;
  left: -265px;
  min-width: 1200px;
}

#dot {
  border-radius: 100%;
  width: 20px;
  height: 20px;
  background-color: red;
}

              
            
!

JS

              
                $(document).ready(function(){
  gsap.registerPlugin(MotionPathPlugin);
  TweenLite.set("svg>polyline", {visibility:"visible"});
  TweenLite.set("svg",{scale:0.7});
  var tm = new TimelineMax({});
  
  tm.add(TweenLite.fromTo("#line1",2, {drawSVG:"0%"}, {drawSVG:"100%", onComplete:function(){
    TweenLite.to("#line1", 0.5,{fill:"#fec72c"});
  }}));
  tm.add(TweenLite.fromTo("#line2",2, {drawSVG:"0%"}, {drawSVG:"100%"}));
  tm.add(TweenLite.fromTo("#line3",2, {drawSVG:" 0%"}, {drawSVG:"100%", onComplete: function(){
    TweenLite.to("#line3", 0.5,{fill:"#ff3333"});
  }}));
  
  gsap.to("#dot", {
  duration: 2, 
  ease: "linear",
  motionPath:{
    path: "#line2",
    align: "#line2",
    autoRotate: true,
    alignOrigin: [0.5, 0.5]
  }
});
  
  tm.play();
  
 /* TweenLite.fromTo("#line1",2, {drawSVG:"0% 0%"}, {drawSVG:"0% 100%", onComplete: function(){
    TweenLite.to("#line1", 0.5,{fill:"#fec72c"});
    TweenLite.set("svg>#line2", {visibility:"visible"});
     TweenLite.fromTo("#line2",2, {drawSVG:"0% 0%"}, {drawSVG:"0% 100%", onComplete: function(){
       TweenLite.set("svg>#line3", {visibility:"visible"});
        TweenLite.fromTo("#line3",2, {drawSVG:"0% 0%"}, {drawSVG:"0% 100%", onComplete: function(){
      TweenLite.to("#line3", 0.5,{fill:"#ff3333"});
    }});
    }});
    
  }});*/
  
  
  //TweenLite.fromTo("#path3", 1, {drawSVG:"0 0%"}, {drawSVG:"100% 100%"});
});

              
            
!
999px

Console