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="fixed-content main-content">
  <div class="strength-title">
    <h1>Strength. Endurance. Recovery.</h1>
  </div>
  <div class="free-session-title">
    <h1>Get your FREE Session today.</h1>
  </div>
</div>

<div class="fixed-content col-lg-7 photobio-title">
  <h1>Whole-body Photobiomodulation</h1>
  <p class="col-lg-10 ml-auto mr-auto">NovoTHOR® is a whole body light therapy device that uses red and near-infrared light to treat injuries, reduce pain, relax muscles/joints, and increase blood circulation. The therapy is called photobiomodulation or PBM.</p>
</div>

<div id="fullPage">
  <section class="black-bg main section"></section>
  <section class="red-bg glow section"></section>
</div>
              
            
!

CSS

              
                $font-60: 60px;
$font-44: 44px;
$font-22: 22px;

body {
  background: radial-gradient(#333333, #000000);
  color: white;
  margin: 0;
}
.line,
.line-wrapper {
  overflow: hidden;
}
.strength-title {
  overflow: hidden;

  h1 {
    font-size: 52px;
    font-weight: 500;
    line-height: 70px;
    text-align: center;
  }
}

.free-session-title {
  margin-top: -5px;
  overflow: hidden;

  h1 {
    font-size: $font-60;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 70px;
    text-align: center;
  }
}

.photobio-title {
  display: block;
  margin-left: auto;
  margin-right: auto;
  top: 15%;
  overflow: hidden;
  z-index: -1;
  // margin-top: -20px;
  h1 {
    font-size: $font-44;
    font-weight: bold;
    line-height: 50px;
    text-align: center;
  }

  p {
    font-size: $font-22;
    font-weight: 100;
    margin-top: 5px;
    line-height: 32px;
    text-align: center;
  }
}

              
            
!

JS

              
                console.clear();

var introTL, secondSectionTL;

function init() {
  // first section
  var mainTitles = new SplitText(".main-content h1", {
    type: "lines",
    linesClass: "line line++"
  });
  
  introTL = gsap.timeline({paused: true});
  
  introTL.from(mainTitles.lines, {
    duration: 2, 
    yPercent: 100,
    ease: "power4",
    delay: 1,
    stagger: 0.25
  });
  
  
  // second section
  var phototitle = new SplitText(".photobio-title h1", {
    type: "lines",
    linesClass: "line line++"
  });
  
  secondSectionTL = gsap.timeline({paused: true});
  
  secondSectionTL.from(phototitle.lines, {
    duration: 2, 
    yPercent: 100,
    ease: "power4",
    delay: 1,
    stagger: 0.25
  });
  
  var secondSectionSplitText = new SplitText(".photobio-title p", { type: "lines,words" }),
      chars = secondSectionSplitText.lines; //an array of all the divs that wrap each character
  
  secondSectionTL.from(chars, {
    opacity: 0,
    duration: 1.5,
    y: 100,
    ease: "power4",
    stagger: 0.15
  });
}

function update() {
  //main
  if ($(".main").hasClass("fp-completely")) {
    secondSectionTL.reverse();
    introTL.play();
  }
  //red-bg
  else if ($(".red-bg").hasClass("fp-completely")) {
    introTL.reverse();
    secondSectionTL.play();
  }
}

$(document).ready(function() {
  init();
  
  $("#fullPage").fullpage({
    scrollOverflow: true,
    autoScrolling: true,
    navigation: true,
    scrollingSpeed: 500,
    afterLoad: function(origin, destination, direction) {
      setTimeout(function() {
        update();
      }, 50);
    }
  });
});

              
            
!
999px

Console