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

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

              
                    <section>
        <h1>EXPECT SICK SH*T FROM HERE ON OUT.</h1>
        <span class="hover-btn">
            <svg viewBox="0 0 62 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M61.0607 13.0607C61.6465 12.4749 61.6465 11.5251 61.0607 10.9393L51.5147 1.3934C50.9289 0.807612 49.9792 0.807612 49.3934 1.3934C48.8076 1.97918 48.8076 2.92893 49.3934 3.51472L57.8787 12L49.3934 20.4853C48.8076 21.0711 48.8076 22.0208 49.3934 22.6066C49.9792 23.1924 50.9289 23.1924 51.5147 22.6066L61.0607 13.0607ZM0 13.5H60V10.5H0V13.5Z" />
            </svg>
        </span>
    </section>

    <section class="overlay">
        <h1>EXPECT SICK SH*T FROM HERE ON OUT.</h1>
        <span class="hover-btn2">
            <svg viewBox="0 0 62 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M61.0607 13.0607C61.6465 12.4749 61.6465 11.5251 61.0607 10.9393L51.5147 1.3934C50.9289 0.807612 49.9792 0.807612 49.3934 1.3934C48.8076 1.97918 48.8076 2.92893 49.3934 3.51472L57.8787 12L49.3934 20.4853C48.8076 21.0711 48.8076 22.0208 49.3934 22.6066C49.9792 23.1924 50.9289 23.1924 51.5147 22.6066L61.0607 13.0607ZM0 13.5H60V10.5H0V13.5Z" />
            </svg>
        </span>
    </section>
              
            
!

CSS

              
                body {
    height: 100vh;
    font-family: 'Bebas Neue';
}
* {
    box-sizing: border-box;
}

section {
    height: 100vh; 
    padding: 3em;

    h1 {
        font-size: 5rem;
    }
}

.overlay {
    background: black;
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    clip-path: circle(100px at var(--x, 50%) var(--y, 50%));
    transition: clip-path 100ms;
}

span {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: black;
    display: flex;
    cursor: pointer;
}

svg {
    margin: 1em;
    fill: white;
}

.is-open {
    clip-path: circle(200% at 100% 100%);
    transition: clip-path 1.3s;
    transition-timing-function: cubic-bezier(1,-0.01,.01,.99);
}
              
            
!

JS

              
                        const span = document.querySelector('.hover-btn2')
        const overlay = document.querySelector('.overlay')

        window.addEventListener('mousemove', (e) => {
            const { clientX, clientY } = e;
            const x = Math.round((clientX / window.innerWidth) * 100);
            const y = Math.round((clientY / window.innerHeight) * 100);

            gsap.to(overlay, {
                '--x': `${x}%`,
                '--y': `${y}%`,
                duration: 0.3,
                ease: 'sine.out'
            })
        })

        span.addEventListener('click', () => {
            overlay.classList.toggle('is-open')
        })
              
            
!
999px

Console