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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 id="scrollDist"></div> -->
<section></section>
<div id="container">
  <svg id="about_text" class="about" viewbox="95 287 820 420" width="820px" height="500px"><path d="M96 462.763l54.591-173.488h51.619l52.918 172.475h-39.879L202.2 415.7h-55l-16 47-35.2.063z" fill="none" stroke-width="2" stroke="#000"/><path id='letter-b' d="M196 385h-42l21-70 21 70zM289.3 460.7l1-170.5 60.5.1q39.5 1 40 43t-27.5 43.5q27.918.502 27.5 39-.5 46-40 45l-61.5-.1z" fill="none" stroke-width="2" stroke="#000"/><path d="M319.8 430.8v-40h21q19.5 2 20 20.5.554 20.493-20.5 20l-20.5-.5zM319.8 359.8v-40h21q19.5 2 20 20.5.554 20.493-20.5 20l-20.5-.5z" fill="none" stroke-width="2" stroke="#000"/><path d="M620.4 289.5V400q-1 58.5 60 58.5t60-57.5V290h-30v111q0 28.5-30 29t-30-30V289l-30 .5zM776.6 290.1v30h50v140h29.5V320.6h50v-30l-129.5-.5z" fill="none" stroke-width="2" stroke="#000"/></svg>
  <svg id='about_color' class="color" viewbox="95 287 820 420" width="820px" height="500px"><path d=" M 96 462.763 L 150.591 289.275 L 202.21 289.275 L 255.128 461.75 L 215.249 461.75 L 202.2 415.7 L 147.2 415.7 L 131.2 462.7 L 96 462.763 Z  M 196 385 L 154 385 L 175 315 L 196 385 Z " fill-rule="evenodd" fill="rgb(255,164,177)"/><path d=" M 319.8 430.8 L 319.8 390.8 L 340.8 390.8 Q 360.3 392.8 360.8 411.3 Q 361.354 431.793 340.3 431.3 L 319.8 430.8 L 319.8 430.8 Z  M 289.3 460.7 L 290.3 290.2 L 350.8 290.3 Q 390.3 291.3 390.8 333.3 Q 391.3 375.3 363.3 376.8 Q 391.218 377.302 390.8 415.8 Q 390.3 461.8 350.8 460.8 L 289.3 460.7 L 289.3 460.7 Z  M 319.8 359.8 L 319.8 319.8 L 340.8 319.8 Q 360.3 321.8 360.8 340.3 Q 361.354 360.793 340.3 360.3 L 319.8 359.8 Z " fill-rule="evenodd" fill="rgb(255,164,177)"/><path d=" M 620.4 289.5 L 620.4 400 Q 619.4 458.5 680.4 458.5 Q 741.4 458.5 740.4 401 L 740.4 290 L 710.4 290 L 710.4 401 Q 710.4 429.5 680.4 430 Q 650.4 430.5 650.4 400 L 650.4 289 L 620.4 289.5 Z " fill="rgb(255,164,177)"/><path d=" M 776.6 290.1 L 776.6 320.1 L 826.6 320.1 L 826.6 460.1 L 856.1 460.1 L 856.1 320.6 L 906.1 320.6 L 906.1 290.6 L 776.6 290.1 Z " fill="rgb(255,164,177)"/></svg>
  <svg id="letter-o-outline" class='letter-o about' viewBox="529 273 500 500" width="500px" height="500px"><path d=" M 531.16 378.002 C 531.16 321.427 577.091 275.495 633.666 275.495 C 690.241 275.495 736.173 321.427 736.173 378.002 C 736.173 434.577 690.241 480.509 633.666 480.509 C 577.091 480.509 531.16 434.577 531.16 378.002 Z " fill="none" stroke-width="2" stroke="rgb(0,0,0)"/></svg>
  <svg id="letter-o-fill" class='color letter-o' viewBox="529 273 500 500" width="500px" height="500px"><path d=" M 531.16 378.002 C 531.16 321.427 577.091 275.495 633.666 275.495 C 690.241 275.495 736.173 321.427 736.173 378.002 C 736.173 434.577 690.241 480.509 633.666 480.509 C 577.091 480.509 531.16 434.577 531.16 378.002 Z " fill="rgb(255,164,177)"/></svg>
</div>
<section></section>
              
            
!

CSS

              
                body {
  background-color: #e7eced;
  margin:0 ;
}

#about_text, #about_color {
  position: absolute;
  width: 50%;
  left: 12%;
  top: 28%;
}

.color {
  z-index: -1;
  opacity: 0;
}

#letter-o-outline, #letter-o-fill {
  position: absolute;
  top: 28%;
  left: 31.5%;
  width: 26%;
  
}

#container {
/* position: fixed; */
/*   height: 100%;
  width: 100%; */
  background-color: grey;
  min-height: 100vh;
  overflow:hidden;
  visibility:hidden;
}
section {
  height: 50vh;
}
              
            
!

JS

              
                
gsap.set('#container', {autoAlpha:1})
  

var about_back = gsap.timeline({
  scrollTrigger: {
    trigger: '#container',
    scrub:0.3,
    markers: true,
    pin:true,
  }
})
.to('.color', {duration:0.5, opacity:1, x:'1vw', y:'1.5vh', ease:'power1'})
.to('.color', {duration:0.5, y:500, ease:'power1.in'})

              
            
!
999px

Console