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="container">
    <div class="row">
        <div class="col-12">
            <h1>TIMELINE</h1>
        </div>
    </div>
    <div class="row animation-row">
        <div class="col-12">
            <div class="svg-dashed-line">
                <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 289.01 352.69">
                    <defs>
                        <style>.cls-1{stroke-dasharray:0 0 11.76 11.76;}.cls-1,.cls-2,.cls-3{fill:none;stroke:#DEDEDE;stroke-miterlimit:10;}.cls-3{stroke-dasharray:0 0 11.99 11.99;}</style>
                    </defs>
                    <path class="cls-2" d="M144.51,0s0,2.41-1.72,5.7"/>
                    <path class="cls-1" d="M134.88,14.25c-7.48,5.16-20.77,9.75-44.37,9.75h-42.12"/>
                    <path class="cls-2" d="M42.51,24h-6s-2.41-.13-5.99.25"/>
                    <path class="cls-3" d="M18.89,27.01C9.95,30.51.89,38,.51,54c-.75,31.89,36,29.43,36,29.43h216s36,.9,36,30.57-36,29.67-36,29.67H36.51s-36-.33-36,29.67,36,30,36,30h216s36-1.15,36,29.43-36,30.57-36,30.57H36.51s-36,0-36,29.67,36,29.67,36,29.67h54s39.02.41,50.72,18.62"/>
                    <path class="cls-2" d="M143.7,346.75c.52,1.83.8,3.81.8,5.93"/>
                </svg>
            </div>
        </div>
        <div class="col-12 years">
            <div class="row nekaj">
                <div class="col-12 col-md-5 offset-md-4 text-center box-top">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 text-end box-left">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 offset-md-8 box-right">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 text-end box-left">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 offset-md-8 box-right">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 text-end box-left">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row animation-row">
        <div class="col-12">
            <div class="svg-dashed-line">
                <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 289.01 352.69">
                    <defs>
                        <style>.cls-1{stroke-dasharray:0 0 11.76 11.76;}.cls-1,.cls-2,.cls-3{fill:none;stroke:#DEDEDE;stroke-miterlimit:10;}.cls-3{stroke-dasharray:0 0 11.99 11.99;}</style>
                    </defs>
                    <path class="cls-2" d="M144.51,0s0,2.41-1.72,5.7"/>
                    <path class="cls-1" d="M134.88,14.25c-7.48,5.16-20.77,9.75-44.37,9.75h-42.12"/>
                    <path class="cls-2" d="M42.51,24h-6s-2.41-.13-5.99.25"/>
                    <path class="cls-3" d="M18.89,27.01C9.95,30.51.89,38,.51,54c-.75,31.89,36,29.43,36,29.43h216s36,.9,36,30.57-36,29.67-36,29.67H36.51s-36-.33-36,29.67,36,30,36,30h216s36-1.15,36,29.43-36,30.57-36,30.57H36.51s-36,0-36,29.67,36,29.67,36,29.67h54s39.02.41,50.72,18.62"/>
                    <path class="cls-2" d="M143.7,346.75c.52,1.83.8,3.81.8,5.93"/>
                </svg>
            </div>
        </div>
        <div class="col-12 years">
            <div class="row nekaj">
                <div class="col-12 col-md-5 offset-md-4 text-center box-top">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 text-end box-left">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 offset-md-8 box-right">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 text-end box-left">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 offset-md-8 box-right">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-6 col-md-4 text-end box-left">
                    <div class="year-wrapper">
                        <div class="year">
                            <div class="year-title">
                                <h2>1990</h2>
                            </div>
                            <div class="year-dsc">
                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia nemo non repellendus sequi?</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</div>
              
            
!

CSS

              
                html {

}

body {
  margin: 0;
  font-size: 16px;
  padding: 0;
  font-family: 'Open Sans',sans-serif;
  overflow-x: hidden;
  color: #21211f;
  font-weight: 300;
}

h1 {
  text-align: center;
}

.animation-row {
  position: relative;
}

.svg-dashed-line {
  margin-left: auto;
  margin-right: auto;
  margin-top: 95px;
  margin-bottom: 0;
  width: 37%;
}

.years {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  .nekaj {
    .box-left, .box-right {
      position: relative;
      &:first-child {
        padding-left: 0;
        padding-bottom: 50px;
      }
      &:nth-child(odd) {
        padding-left: 50px;
        &:before {
          content: '';
          position: absolute;
          z-index: 1;
          top: 0;
          left: 0;
          height: 100%;
          width: 36px;
          background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAQlBMVEX/////AAD/oKD/MjL/+/v/3d3/6en/o6P/qqr/tLT/vr7/5eX/2dn/y8v/paX/p6f/mpr/8/P/0dH/urr/rq7/LCxDuu02AAABjklEQVR4nO3dQU4CURBF0W8DQreiCLL/rerAiSaiIen0q9/nruCdeSXV2tvT8/l4nKbpMn52+Opl/63h/vZ/9nr4R+/jf5p+dtm18aHvTt0LB8LyDe2w9ISZI6wfYf0I60dYP8L6rUH4uvSEmRvafukJM0dYP8L6EdaPsH5rFx53NXq+3it8bEXa9C7cEhLGR0iYHyFhfoSE+RES5kdImB9h78KBsECEhPkREuZHSJgfIWF+hIT5ERLmR0iYHyFhfoSE+RES5kdImB8hYX6EvQv7vxgirBAhYX6EhPkREuZHSJgfIWF+hIT5ERLmR0iYHyFhfoSE+RES5kdImN/ahS/dC2/9mSFMiZAwP0LC/AgJ8yMkzI+QMD9CwvwICfMjJMyPkDA/QsL8CAnzI+xdOBIWiJAwP0LC/AgJ8yMkzI+QMD9CwvwICfMjJMyP8Pee2rZEb3cLr5si3TDcFvYQYf0I60dYvzUIp6UnzBxh/QjrR1g/wvoR1o+wfoT1I6zf0C5LT5i5U9udhp47nT8AFYpyB6jAGmEAAAAASUVORK5CYII=');
          background-repeat: no-repeat;
          background-size: contain;
          background-position: center;
        }
      }
      &:nth-child(even) {
        padding-right: 50px;
        &:after {
          content: '';
          position: absolute;
          z-index: 1;
          top: 0;
          right: 0;
          height: 100%;
          width: 36px;
          background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAQlBMVEX/////AAD/oKD/MjL/+/v/3d3/6en/o6P/qqr/tLT/vr7/5eX/2dn/y8v/paX/p6f/mpr/8/P/0dH/urr/rq7/LCxDuu02AAABjklEQVR4nO3dQU4CURBF0W8DQreiCLL/rerAiSaiIen0q9/nruCdeSXV2tvT8/l4nKbpMn52+Opl/63h/vZ/9nr4R+/jf5p+dtm18aHvTt0LB8LyDe2w9ISZI6wfYf0I60dYP8L6rUH4uvSEmRvafukJM0dYP8L6EdaPsH5rFx53NXq+3it8bEXa9C7cEhLGR0iYHyFhfoSE+RES5kdImB9h78KBsECEhPkREuZHSJgfIWF+hIT5ERLmR0iYHyFhfoSE+RES5kdImB8hYX6EvQv7vxgirBAhYX6EhPkREuZHSJgfIWF+hIT5ERLmR0iYHyFhfoSE+RES5kdImN/ahS/dC2/9mSFMiZAwP0LC/AgJ8yMkzI+QMD9CwvwICfMjJMyPkDA/QsL8CAnzI+xdOBIWiJAwP0LC/AgJ8yMkzI+QMD9CwvwICfMjJMyP8Pee2rZEb3cLr5si3TDcFvYQYf0I60dYvzUIp6UnzBxh/QjrR1g/wvoR1o+wfoT1I6zf0C5LT5i5U9udhp47nT8AFYpyB6jAGmEAAAAASUVORK5CYII=');
          background-repeat: no-repeat;
          background-size: contain;
          background-position: center;
        }
      }
    }
  }
  .year-wrapper {
    position: relative;
    margin-bottom: 24px;
    .year-title {
      h2 {
        font-family: 'Open Sans Condensed',sans-serif;
        color: #e4032e;
        font-weight: 700;
      }
    }
    .year-dsc {
      p {
        font-size: 14px;
      }
    }
  }
}

              
            
!

JS

              
                function docReady(fn) {
    if(document.readyState === "complete" || document.readyState === "interactive") {
        setTimeout(fn, 1);
    } else {
        document.addEventListener("DOMContentLoaded", fn);
    }}

docReady(function() {
    window.onload = function() {
        gsap.to('.cls-1', {
            duration: 2,
            strokeDasharray: "11.76 11.76",
            ease: "linear"
        });

        gsap.to('.cls-2', {
            duration: 2,
            strokeDasharray: "11.76 11.76",
            ease: "linear"
        });

        gsap.to('.cls-3', {
            duration: 2,
            strokeDasharray: "11.99 11.99",
            ease: "linear"
        });

        let revealLeftBox = document.querySelectorAll(".box-left");
        let revealRightBox = document.querySelectorAll(".box-right");
        let revealTopBox = document.querySelectorAll(".box-top");

        gsap.from(revealLeftBox, {
            duration: 1,
            opacity: 0,
            x: -30,
            ease: "linear",
            stagger: .75
        });
        gsap.from(revealRightBox, {
            duration: 1,
            opacity: 0,
            x: 50,
            ease: "linear",
            stagger: .75
        });
        gsap.from(revealTopBox, {
            duration: 1,
            opacity: 0,
            y: -30,
            ease: "linear",
            stagger: .75
        });
    };
});

              
            
!
999px

Console