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="smooth-wrapper">
  <div id="smooth-content">
    <section id="header">
      <div class="center">
        <div class="container float">
          <div class="row">
            <div class="column">
              <h1>Digital Design Culture</h1>
            </div>
            <div class="column">
              <h4>Spending time looking for your parcel around the neighbourhood is a thing of the past. That’s a promise.</h2>
            </div>
          </div>
        </div>
        <div class="imganimator">
          <div class="parallax-slab">
            <img data-speed=".5" src="https://www.theshoponline.be/uploads/products/Ferm_Living/Lightning/Hoop_Shade/ferm_living_hoop_shade_lampenkap_the_shop_online_1.jpg" alt="">
          </div>
        </div>
      </div>
    </section>

    <section id="content">
      <div class="container">
        <div class="row">
          <div class="column">
            <h4>Spending time looking for your parcel around the neighbourhood is a thing of the past. That’s a promise.</h4>
          </div>
          <div class="column">
            <h4>Spending time looking for your parcel around the neighbourhood is a thing of the past. That’s a promise.</h4>
          </div>
        </div>
      </div>
    </section>

    <section>
      <div class="center">
        <div class="container float">
          <div class="row">
            <div class="column">
              <h4>Spending time looking for your parcel around the neighbourhood is a thing of the past. That’s a promise.</h4>
            </div>
            <div class="column">
              <h4>Spending time looking for your parcel around the neighbourhood is a thing of the past. That’s a promise.</h4>
            </div>
          </div>
        </div>
        <div class="parallax-slab">
          <img data-speed=".5" src="https://www.theshoponline.be/uploads/products/Ferm_Living/Lightning/Hoop_Shade/ferm_living_hoop_shade_lampenkap_the_shop_online_1.jpg" alt="">
        </div>
        <div>
    </section>
  </div>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Signika+Negative:300,400&display=swap");

$globalmargin: 6%;

html {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Signika Negative", sans-serif;
  font-weight: 300;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

h1 {
    font-weight: 500;
    font-size: 8vw;
}

h2 {
    font-weight: 500;
    font-size: 6vw;
}

h3 {
    font-weight: 500;
    font-size: 5vw; 
}

h4 {
    font-weight: 500;
    font-size: 4vw; 
}

h5 {
    font-weight: 500;
    font-size: 3vw; 
}

h6 {
    font-weight: 500;
    font-size: 2vw; 
}

p{
    font-weight: 500;
    font-size: 1.5vw;
}

/* wrapper */
/*–––––––––––––––––––––––––––––––––––––––––––––––––– */
.float {
  z-index: 10;
  position: absolute;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.container {
  margin: $globalmargin;
}

.row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  gap: 3vw;
}

.column {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 1;
}

.double-column {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 2;
}

.parallax-slab {
    display:flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 150vh;
    width: 100vw;
    overflow: hidden;

    img{
     position: absolute;    
     object-fit: cover;

    }
}

              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger, ScrollSmoother);

// when i remove this animation it works fine, but it conflicts with the parralax
gsap.fromTo(
  "#header",
  1.5,
  { yPercent: 114, rotation: 4 },
  { yPercent: 0, rotation: 0, force3D: true, ease: Power4.easeOut }
);



// create the smooth scroller FIRST!
const smoother = ScrollSmoother.create({
  wrapper: "#smooth-wrapper",
  content: "#smooth-content",
  smooth: 1,
  normalizeScroll: true, // prevents address bar from showing/hiding on most devices, solves various other browser inconsistencies
  ignoreMobileResize: true, // skips ScrollTrigger.refresh() on mobile resizes from address bar showing/hiding
  effects: true,
  preventDefault: true
});

              
            
!
999px

Console