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

              
                <!-- Latest compiled bootstrap 3 -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<p>scroll down to see animations</p>

<div class="container set_height">
	<div class="row arrow_parent">
		<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
			<div class="repeater-bar-number scroll_to1">
				first svg group
			</div>			
			<svg class="arrow-1-wrapper arrow-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
				viewBox="0 0 155.5 128.3" style="enable-background:new 0 0 155.5 128.3;" xml:space="preserve">
				<style type="text/css">
					.st2{fill:none;}
				</style>
				<path class="tail st2" d="M5.2,38.4h75.7c0,0,0.1,0.1,0.1,0.1c6.5,0,11.8,5.1,11.8,11.5v26.5"/>
				<path class="arrow" d="M6.3,21c7.3,4.5,14.7,8.9,22,13.4c2.4,1.4,4.7,2.9,7.9,4.8C25.7,45.3,15.9,51,5.3,57.1c0-12.5,0-24.3,0-36.1
					C5.6,21,5.9,21,6.3,21z"/>
			</svg>

			<svg class="arrow-2-wrapper arrow-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
				viewBox="0 0 124 91.9" style="enable-background:new 0 0 124 91.9;" xml:space="preserve">
				<style type="text/css">
					.st0{fill:none;}
				</style>
				<path class="tail st0" d="M74.8,1v36.6c0,6-5.6,10.8-12.4,10.8l-26.4,0"/>
				<path class="arrow" d="M6.3,21c7.3,4.5,14.7,8.9,22,13.4c2.4,1.4,4.7,2.9,7.9,4.8C25.7,45.3,15.9,51,5.3,57.1c0-12.5,0-24.3,0-36.1
					C5.6,21,5.9,21,6.3,21z"/>
			</svg>
			 <svg class="arrow-3-wrapper arrow-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
				viewBox="0 0 297.8 104.5" style="enable-background:new 0 0 297.8 104.5;" xml:space="preserve">
				<style type="text/css">
					.st0{fill:none;}
				</style>
				<path class="tail st0" d="M265.2,32H49.9c-5.5,0-10,4-10,9v29.1"/>
				<path class="arrow" d="M6.3,21c7.3,4.5,14.7,8.9,22,13.4c2.4,1.4,4.7,2.9,7.9,4.8C25.7,45.3,15.9,51,5.3,57.1c0-12.5,0-24.3,0-36.1
					C5.6,21,5.9,21,6.3,21z"/>
			</svg>
		</div>
	</div>
	<div class="row arrow_parent">
		<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
			<div class="repeater-bar-number scroll_to2">
				second svg group
			</div>			
			<svg class="arrow-4-wrapper arrow-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
				viewBox="0 0 104.6 48.9" style="enable-background:new 0 0 104.6 48.9;" xml:space="preserve">
				<style type="text/css">
					.st0{fill:none;}
				</style>
				<path class="tail st0" d="M25.6,13.3c0,6.6,6.9,12,15.5,12h23.6"/>
				<path class="arrow" d="M6.3,21c7.3,4.5,14.7,8.9,22,13.4c2.4,1.4,4.7,2.9,7.9,4.8C25.7,45.3,15.9,51,5.3,57.1c0-12.5,0-24.3,0-36.1
					C5.6,21,5.9,21,6.3,21z"/>
			</svg>
			<svg class="arrow-5-wrapper arrow-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
				viewBox="0 0 346 38" style="enable-background:new 0 0 346 38;" xml:space="preserve">
				 <style type="text/css">
					.st0{fill:none;}
				</style>
				<path class="tail st0" d="M0,18.5h282.3"/>
				<path class="arrow" d="M6.3,21c7.3,4.5,14.7,8.9,22,13.4c2.4,1.4,4.7,2.9,7.9,4.8C25.7,45.3,15.9,51,5.3,57.1c0-12.5,0-24.3,0-36.1
					C5.6,21,5.9,21,6.3,21z"/>
			</svg>
			<svg class="arrow-6-wrapper arrow-wrapper" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
					x="0px" y="0px" viewBox="0 0 403 166" style="enable-background:new 0 0 403 166;" xml:space="preserve">
				<style type="text/css">
					.st0{fill:none;}
				</style>
				<path class="tail st0" d="M4,61.7h334.7c7,0,12.6,6.1,12.6,13.7v25.7"/>
				<path class="arrow" d="M6.3,21c7.3,4.5,14.7,8.9,22,13.4c2.4,1.4,4.7,2.9,7.9,4.8C25.7,45.3,15.9,51,5.3,57.1c0-12.5,0-24.3,0-36.1
					C5.6,21,5.9,21,6.3,21z"/>
			</svg>
		</div>
	</div>
</div>

              
            
!

CSS

              
                body {
 margin:0;
 background: #fff;
}
.set_height {
  min-height: 2000px;
}
.repeater-bar-number {
  min-height:466px;
}
.push_down {
  margin-top:100px;
}
.adwords_svg_group,
.seo_svg_group {
    path,
    rect,
    polygon,
    circle {
        visibility: hidden;
    }
}

svg {
    display: block;
    margin: 20px auto;
    width: 400px;
    visibility: hidden;
  
    @media(max-width: 500px) {
      visibility:hidden !important;
    }
}

.arrow_parent {
    position: relative;
}
.arrow-wrapper {
    position: absolute;
}

.tail {
    stroke-width: 15px;
    stroke: #353535;
}

.arrow {
    fill: #353535;
}

.arrow-1-wrapper {
    left: 330px;
    top: 168px;
    width: 14%;
    @media(max-width: 1199px) {
        left: 305px;
        top: 187px;
    }
    @media(max-width: 991px) {
        left: 258px;
        top: 275px;
    }
}

.arrow-2-wrapper {
    left: 347px;
    top: 301px;
    width: 11.5%;
    @media(max-width: 1199px) {
        left: 319px;
        top: 326px;
    }
    @media(max-width: 991px) {
        left: 269px;
        top: 422px;
    }
}

.arrow-3-wrapper {
    top: 319px;
    left: 39px;
    width: 27.8%;
    @media(max-width: 1199px) {
        top: 341px;
        left: 28px;
    }
    @media(max-width: 991px) {
        top: 432px;
        left: -9px;
    }
}

.arrow-4-wrapper {
    width: 10%;
    top: -9px;
    left: 56px;
    @media(max-width: 1199px) {
        top: -4px;
        left: 41px;
    }
    @media(max-width: 991px) {
        top: 21px;
        left: 1px;
    }
}

.arrow-5-wrapper {
    width: 30%;
    top: 1.5px;
    left: 224px;
    @media(max-width: 1199px) {
        top: 5px;
        left: 173px;
    }
    @media(max-width: 991px) {
        top: 27px;
        left: 179px;
    }
}

.arrow-6-wrapper {
    width: 35%;
    top: -43px;
    left: 598px;
    @media(max-width: 1199px) {
        top: -31px;
        left: 481px;
    }
    @media(max-width: 991px) {
        top: 0px;
        left: 497px;
    }
}

              
            
!

JS

              
                  var tl;
  var been_here = 0,
    path1,
    path2,
    path3,
    path4,
    path5,
    path6,
    path7,
    path8,
    path9;
  tl = new TimelineMax({
    repeat: 0
  });

  path1 = MorphSVGPlugin.pathDataToBezier(".arrow-1-wrapper .tail", {
    align: ".arrow-1-wrapper .arrow"
  });
  path2 = MorphSVGPlugin.pathDataToBezier(".arrow-2-wrapper .tail", {
    align: ".arrow-2-wrapper .arrow"
  });
  path3 = MorphSVGPlugin.pathDataToBezier(".arrow-3-wrapper .tail", {
    align: ".arrow-3-wrapper .arrow"
  });
  path4 = MorphSVGPlugin.pathDataToBezier(".arrow-4-wrapper .tail", {
    align: ".arrow-4-wrapper .arrow"
  });
  path5 = MorphSVGPlugin.pathDataToBezier(".arrow-5-wrapper .tail", {
    align: ".arrow-5-wrapper .arrow"
  });
  path6 = MorphSVGPlugin.pathDataToBezier(".arrow-6-wrapper .tail", {
    align: ".arrow-6-wrapper .arrow"
  });
  TweenLite.set(".arrow", {
    yPercent: -50,
    xPercent: 2
  });

  tl
    .pause()
    .add("start_of_the_tl")
    .set({}, {}, "start_of_the_tl+=0.1") //filler
    .add("start_of_group_1")
    .set(".arrow-1-wrapper", {
      visibility: "visible"
    }, "start_of_group_1")
    .to(".arrow-1-wrapper .arrow", 0.5, {
      bezier: {
        values: path1,
        type: "cubic",
        autoRotate: true
      },
      transformOrigin: "0% 50% -50",
      ease: Linear.easeNone
    })
    .fromTo(".arrow-1-wrapper .tail", 0.5, {
      drawSVG: 0
    }, {
      drawSVG: "100%",
      ease: Linear.easeNone
    }, "start_of_group_1")

  //next arrow in group
  .set(".arrow-2-wrapper", {
      visibility: "visible"
    }, "start_of_group_1+=0.5")
    .to(".arrow-2-wrapper .arrow", 0.4, {
      bezier: {
        values: path2,
        type: "cubic",
        autoRotate: true
      },
      transformOrigin: "0% 50% -50",
      ease: Linear.easeNone
    })
    .fromTo(".arrow-2-wrapper .tail", 0.4, {
      drawSVG: 0
    }, {
      drawSVG: "100%",
      ease: Linear.easeNone
    }, "start_of_group_1+=0.5")

  //next arrow in group
  .set(".arrow-3-wrapper", {
      visibility: "visible"
    }, "start_of_group_1+=0.9")
    .to(".arrow-3-wrapper .arrow", 1, {
      bezier: {
        values: path3,
        type: "cubic",
        autoRotate: true
      },
      transformOrigin: "0% 50% -50",
      ease: Linear.easeNone
    })
    .fromTo(".arrow-3-wrapper .tail", 1, {
      drawSVG: 0
    }, {
      drawSVG: "100%",
      ease: Linear.easeNone
    }, "start_of_group_1+=0.9")
    .add("end_of_group_1")

  .set({}, {}, "end_of_group_1+=0.1") //filler

  // Start of Group 2
  .add("start_of_group_2")
    .set(".arrow-4-wrapper", {
      visibility: "visible"
    }, "start_of_group_2")
    .to(".arrow-4-wrapper .arrow", 0.3, {
      bezier: {
        values: path4,
        type: "cubic",
        autoRotate: true
      },
      transformOrigin: "0% 50% -50",
      ease: Linear.easeNone
    })
    .fromTo(".arrow-4-wrapper .tail", 0.3, {
      drawSVG: 0
    }, {
      drawSVG: "100%",
      ease: Linear.easeNone
    }, "start_of_group_2")

  // next
  .set(".arrow-5-wrapper", {
      visibility: "visible"
    }, "start_of_group_2+=0.3")
    .to(".arrow-5-wrapper .arrow", 1, {
      bezier: {
        values: path5,
        type: "cubic",
        autoRotate: true
      },
      transformOrigin: "0% 50% -50",
      ease: Linear.easeNone
    })
    .fromTo(".arrow-5-wrapper .tail", 1, {
      drawSVG: 0
    }, {
      drawSVG: "100%",
      ease: Linear.easeNone
    }, "start_of_group_2+=0.3")

  // next
  .set(".arrow-6-wrapper", {
      visibility: "visible"
    }, "start_of_group_2+=1.3")
    .to(".arrow-6-wrapper .arrow", 1, {
      bezier: {
        values: path6,
        type: "cubic",
        autoRotate: true
      },
      transformOrigin: "0% 50% -50",
      ease: Linear.easeNone
    })
    .fromTo(".arrow-6-wrapper .tail", 1, {
      drawSVG: 0
    }, {
      drawSVG: "100%",
      ease: Linear.easeNone
    }, "start_of_group_2+=1.3")
    .add("end_of_group_2")
    // Start of Group 3

  .set({}, {}, "end_of_group_2+=0.1"); //filler    

  arrow_controlls = function() {
    // animate when scrolling down   
    if ($(window).scrollTop() >= $('.scroll_to1').offset().top && been_here === 0) {
      tl.tweenFromTo("start_of_group_1", "end_of_group_1");
      been_here = 1;
    }
    if ($(window).scrollTop() >= $('.scroll_to2').offset().top && been_here === 1) {
      tl.tweenFromTo("start_of_group_2", "end_of_group_2");
      been_here = 2;
    }

    // resets to put back when scrolling up
    if ($(window).scrollTop() < $('.scroll_to1').offset().top && been_here === 1) {
      been_here = 0;
      tl.tweenFromTo("end_of_group_1", "start_of_the_tl");
    }
    if ($(window).scrollTop() < $('.scroll_to2').offset().top && been_here === 2) {
      been_here = 1;
      tl.tweenFromTo("end_of_group_2", "end_of_group_1");
    }
  };
  $(window).on("scroll.arrow_controlls", arrow_controlls);

              
            
!
999px

Console