Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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="heroWithAnimation">



  <div class="container">
    <div class="row justify-content-center">

      <div class="col-12 col-md-10">

        <div class="heroWithAnimation__header color--white text-center" data-animate="fadeIn">
        </div>

          <div class="heroWithAnimation__button" data-animate="fadeIn">
     
          </div>
   

      </div>

    </div>
  </div>
  <div class="heroWithAnimation__overlay"></div>

  <div class="heroWithAnimation__pattern">
    
<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"
	 viewBox="0 0 1600 400" style="enable-background:new 0 0 1600 400;" xml:space="preserve">

  
  
<style type="text/css">
	.st0{opacity:0.6;fill:#FFFFFF;}
	.st1{fill:#FFFFFF;}
	.st2{opacity:0.7;fill:#FFFFFF;}
	.st3{opacity:0.8;fill:#FFFFFF;}
	.st4{opacity:0.4;fill:#FFFFFF;}
	.st5{opacity:0.2;fill:#FFFFFF;}
	.st6{opacity:0.3;fill:#FFFFFF;}
	.st7{opacity:0.1;fill:#FFFFFF;}
	.st8{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
</style>
  

<rect x="592.5" y="35.4" class="st5 high__rect--1" width="15.8" height="15.8"/>
<circle class="st7 high__circle--2" cx="669.9" cy="14" r="10.5"/>
<rect x="733.9" y="23.2" transform="matrix(0.7071 -0.7071 0.7071 0.7071 195.2609 533.6146)" class="st5 high__rect--3" width="15.8" height="15.8"/>
<rect x="816.7" y="49" class="st4 high__rect--4" width="15.8" height="15.8"/>
<circle class="st5 high__circle--5" cx="889.7" cy="10.5" r="10.5"/>
<rect x="951.4" y="20.6" class="st6 high__circle--6" width="15.8" height="15.8"/>
<rect x="1034.3" y="45.3" transform="matrix(0.7071 -0.7071 0.7071 0.7071 267.6085 752.5548)" class="st6 high__rect--7" width="15.8" height="15.8"/>
  
<circle class="st0 top__circle--5" cx="889.9" cy="91.2" r="17.9"/>
<rect x="808.8" y="121.8" class="st1 top__rect--4" width="31.6" height="31.6"/>
<rect x="584.6" y="118.6" class="st2 top__rect--1" width="31.6" height="31.6"/>
<rect x="943.5" y="96.5" class="st3 top__rect--6" width="31.6" height="31.6"/>
  

<rect x="1026.5" y="121.7" transform="matrix(0.7071 -0.7071 0.7071 0.7071 208.0598 777.2719)" class="st1 top__rect--7" width="31.6" height="31.6"/>
<rect x="725.8" y="104" transform="matrix(0.7071 -0.7071 0.7071 0.7071 132.5282 559.4997)" class="st2 top__rect--3" width="31.6" height="31.6"/>
<circle class="st4 top__circle--2" cx="669.8" cy="108.6" r="17.9"/>


<path class="st8" d="M840.4,153.4H872V185c0,9.9,8,17.9,17.9,17.9s17.9-8,17.9-17.9c0-4.7,1.9-9.3,5.2-12.6
	c3.4-3.4,7.9-5.2,12.6-5.2c4.7,0,9.3,1.9,12.6,5.2s5.2,7.9,5.2,12.6v31.6h31.6V185l22.4-22.4l22.4,22.4l22.4,22.4l22.4-22.4h535.2
	v215.1H0.2V185h539.7l22.4-22.4l22.4,22.4v31.6h31.6V185c0-4.7,1.9-9.3,5.2-12.6s7.9-5.2,12.6-5.2s9.3,1.9,12.6,5.2
	c3.4,3.4,5.2,7.9,5.2,12.6c0,9.9,8,17.9,17.9,17.9c9.9,0,17.9-8,17.9-17.9v-31.6h31.6V185l22.4,22.4l44.7-44.7l22.4,22.4v31.6h31.6
	V153.4z"/>
<rect x="981.7" y="225.4" transform="matrix(0.7071 -0.7071 0.7071 0.7071 121.6044 776.0109)" class="bottom__rect--7" width="31.6" height="31.6"/>
<rect x="770.7" y="251" transform="matrix(0.7071 -0.7071 0.7071 0.7071 41.6917 634.3301)" class="bottom__rect--3" width="31.6" height="31.6"/>  
  
<rect x="546.4" y="231.7" mask="url(#image-mask)" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -10.3719 470.0517)" class="bottom__rect--1" width="31.6" height="31.6"/>
<rect x="687.7" y="223" class="bottom__rect--2" width="31.6" height="31.6"/>
<ellipse transform="matrix(0.6154 -0.7882 0.7882 0.6154 34.3411 602.0275)" class="bottom__circle--1" cx="634.1" cy="265.8" rx="17.9" ry="17.9"/>
<path class="bottom__circle--2" d="M907.8,263.6c0,9.9,8,17.9,17.9,17.9c9.9,0,17.9-8,17.9-17.9c0-9.9-8-17.9-17.9-17.9
	C915.8,245.7,907.8,253.7,907.8,263.6z"/>
<rect x="840.3" y="217" class="bottom__rect--5" width="31.6" height="31.6"/>

</svg>

  </div>


</div>

              
            
!

CSS

              
                .heroWithAnimation{
  height:50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background-attachment: fixed;

    min-height: 500px;
    padding-bottom:300px;
  background:url('http://lorempixel.com/1024/768');
  background-repeat:no-repeat;
  background-size:cover;
  background-position:top center;
  
  color:#fff;

  &__overlay{
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 1;
    background: rgba(0,0,0,0.6);
  }



  &__pattern {
    position: absolute;
    bottom: 0px;
    width: 100%;
    z-index: 100;
  }

}
              
            
!

JS

              
                $(document).ready(function(){

  var tlHighShapes = new TimelineMax();

  tlHighShapes
  .to(".high__rect--1", {duration: 1, y: 61, ease: Power0.easeOut, opacity:0},"<")
  .to(".high__circle--2", {duration: 1.3, y: 84, ease: Power0.easeOut, opacity:0},"<")
  .to(".high__rect--3", {duration: 1.3, y: 86, ease: Power0.easeOut, opacity:0},"<")
  .to(".high__rect--4", {duration: 1.4, y: 90, ease: Power0.easeOut, opacity:0},"<")
  .to(".high__circle--5", {duration: 1, y: 67, ease: Power0.easeOut, opacity:0},"<")
  .to(".high__circle--6", {duration: 1.3, y: 80, ease: Power0.easeOut, opacity:0},"<")
  .to(".high__rect--7", {duration: 1.4, y: 100, ease: Power0.easeOut, opacity:0},"<");

  var tlBottomShapes = new TimelineMax();

  tlBottomShapes
  .to(".bottom__rect--7", {duration: 2, y: -41, ease: Power0.easeOut},"<")
  .to(".bottom__rect--5", {duration: 2.3, y: -64, ease: Power0.easeOut},"<")
  .to(".bottom__rect--3", {duration: 2.3, y: -66, ease: Power0.easeOut},"<")
  .to(".bottom__rect--2", {duration: 2.4, y: -70, ease: Power0.easeOut},"<")
  .to(".bottom__rect--1", {duration: 2, y: -47, ease: Power0.easeOut},"<")
  .to(".bottom__circle--1", {duration: 2.3, y: -60, ease: Power0.easeOut},"<")
  .to(".bottom__circle--2", {duration: 2.4, y: -80, ease: Power0.easeOut},"<");

  var tlTopShapes = new TimelineMax();

  tlTopShapes
  .to(".top__rect--1", {duration: 1, y: 67, opacity:1},"<")
  .to(".top__circle--2", {duration: 1, y: 77, opacity:1},"<")
  .to(".top__rect--3", {duration: 1, y: 81, opacity:1},"<")
  .to(".top__rect--4", {duration: 1, y: 63, opacity:1},"<")
  .to(".top__circle--5", {duration: 1, y: 94, opacity:1},"<")
  .to(".top__rect--6", {duration: 1, y: 88, opacity:1},"<")
  .to(".top__rect--7", {duration: 1, y: 63, opacity:1},"<");


  stHighShapes = ScrollTrigger.create({
    trigger: ".heroWithAnimation__pattern",
    start: "top center",
    end: "+=50",
    scrub: true,
    animation: tlHighShapes
  });

  stBottom = ScrollTrigger.create({
    trigger: ".heroWithAnimation__pattern",
    start: "top center",
    end: "+=100",
    scrub: true,
    animation: tlBottomShapes
  });

  stTop = ScrollTrigger.create({
    trigger: ".heroWithAnimation__pattern",
    start: "top center",
    end: "+=100",
    scrub: true,
    animation: tlTopShapes
  });



});
              
            
!
999px

Console