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="content">
  Content
</div>
<footer>
    <div class="my-name"><span>Jens</span> <span>Nielsen</span></div>
    <div class="my-title"><span>Digital</span> <span>Designer</span></div>
    <div class="social-links">
        <span><a href="#" class="dribbble">dribbble</a></span>
        <span><a href="#" class="linkedin">linkedin</a></span>
        <span><a href="#" class="twitter">twitter</a></span>
        <span><a href="#" class="instagram">instagram</a></span>
    </div>
</footer>
              
            
!

CSS

              
                body{
  margin:0;
}

.content {
  height:200vh;
}

footer {
    box-sizing: border-box;
    position: relative;
    padding: 1vw;
    margin-bottom: 2vh;
}
/*
footer span {
    transform: translate(0px, 150px);
}
*/

footer div.my-name,
footer div.my-title {
    display: block;
    position: relative;
    overflow: hidden;
    padding-top: 1.0vw;
}

footer .my-name span,
footer .my-title span {
    display: inline-block;
    position: relative;
    font-size: 8vw;
    line-height: 7vw;
    text-transform: uppercase;
}

footer .social-links span {
    display: inline-block;
    position: relative;
}

footer .social-links {
    display: block;
    position: relative;
    overflow: hidden;
}

footer a {
    color: black;
    text-decoration: none;
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    font-size: 2vw;
    padding: 0.7vw 3vw 0.3vw 3vw;
    margin: 0 1vw 0 0;
    border: 3px solid;
    border-color: black;
    border-radius: 200px;
    text-transform: uppercase;
    background-color: Yellow;
    transition: background-color 0.3s ease-in-out;
}

footer a:hover {
    background-color: transparent;
}
              
            
!

JS

              
                

gsap.defaults({ease: "expo.out"});
gsap.set("footer span", {y: 150});
ScrollTrigger.batch("footer span", {
  start: "top bottom",
  onEnter: batch => gsap.to(batch, {y: 0, stagger: 0.2, duration: 0.7}),
});

// when ScrollTrigger does a refresh(), it maps all the positioning data which 
// factors in transforms, but in this example we're initially setting all the ".box"
// elements to a "y" of 100 solely for the animation in which would throw off the normal 
// positioning, so we use a "refreshInit" listener to reset the y temporarily. When we 
// return a gsap.set() in the listener, it'll automatically revert it after the refresh()!
ScrollTrigger.addEventListener("refreshInit", () => gsap.set("footer span", {y: 0}));
              
            
!
999px

Console