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 asscroll-container>
    <div class="page">
        <div id="top"></div>
        <img src="https://raw.githubusercontent.com/ashthornton-gc/asscroll/master/docs/banner.jpg" alt="">
        <div class="content">
            <h1 class="title">
                <span>A</span>
                <span>S</span>
                <span>S</span>
                <span>C</span>
                <span>R</span>
                <span>O</span>
                <span>L</span>
                <span>L</span>
                <span>🍑</span>
            </h1>
            <div>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ornare quis nibh eget convallis. Nam aliquam tempus dolor, at blandit elit vulputate eu. Mauris iaculis sem at nulla euismod auctor. Duis dui risus, lacinia quis fringilla a, dictum a lectus. Aliquam id dui a nisi dignissim aliquet nec sed augue. Vestibulum congue felis sit amet iaculis scelerisque. Vivamus facilisis lacus sit amet eros eleifend dapibus in eget neque. Aliquam nisi urna, porttitor et nisi in, pretium lacinia orci. Cras vitae leo posuere, condimentum magna et, vulputate mi. Nullam maximus ullamcorper leo eu auctor. Quisque eget fermentum est, aliquet cursus libero. Sed scelerisque mauris sed enim tristique tempus ornare vestibulum quam. Etiam eget aliquam augue. In nec lectus convallis, lobortis risus in, euismod lorem. Sed eleifend nisi ut lorem convallis, nec blandit ante egestas.</p>

                <p>Quisque quis tincidunt nunc. In magna est, malesuada quis tempus id, fermentum eleifend urna. Fusce facilisis rhoncus nibh, eget pellentesque mauris rhoncus ut. Nulla congue vel lacus nec pellentesque. Praesent eget elit nisi. Ut eu enim arcu. Duis et nisi ligula. Maecenas eu ante eget augue pulvinar efficitur. Aenean vitae luctus dolor. Ut iaculis orci ut orci tincidunt, id efficitur nulla accumsan. Nullam feugiat porta hendrerit. Pellentesque eget fringilla leo. Quisque laoreet ligula quis consectetur aliquam.</p>

                <p>Nam vel auctor nisl. Cras vel suscipit nibh. Donec nec massa sagittis, vehicula magna ac, scelerisque velit. Etiam mollis felis orci, id placerat ipsum egestas a. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean faucibus vulputate feugiat. Nam condimentum arcu urna, id tincidunt nisl rhoncus quis. Duis mauris mi, dapibus et nisl at, facilisis tristique lectus. Nam vel felis in metus hendrerit placerat ac quis massa. Nam eget turpis nunc. Nullam at tincidunt lacus. Nulla viverra magna in nisi semper, non interdum nunc tempus. In pellentesque porttitor bibendum. Vestibulum blandit congue tempor.</p>

                <p>Cras congue, nunc et imperdiet porttitor, dui nisl ultricies ipsum, sed bibendum neque leo auctor sem. Nam velit ipsum, dictum eget dolor pellentesque, pulvinar imperdiet purus. Quisque leo dui, eleifend non porttitor quis, auctor convallis tortor. Integer vel justo at odio suscipit gravida vitae ut tellus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sapien urna, iaculis quis magna at, facilisis ultrices elit. Maecenas ac elementum metus, sit amet congue nunc. Maecenas vitae posuere lectus. Integer maximus neque at nunc vestibulum imperdiet. Aenean imperdiet ligula semper nibh dapibus facilisis. Pellentesque gravida dignissim lacus, et vulputate sapien dapibus commodo. Etiam efficitur facilisis sollicitudin. Quisque velit nulla, condimentum ac tellus eget, rutrum placerat ipsum. Cras auctor auctor sem sed ullamcorper.</p>

                <h3>iframe:</h3>
                <iframe src="https://cdpn.io/ashthornton/debug/ff7efd49451e9faf9416eb989bfaac8c" frameborder="0"></iframe>
                
                <p>Quisque quis tincidunt nunc. In magna est, malesuada quis tempus id, fermentum eleifend urna. Fusce facilisis rhoncus nibh, eget pellentesque mauris rhoncus ut. Nulla congue vel lacus nec pellentesque. Praesent eget elit nisi. Ut eu enim arcu. Duis et nisi ligula. Maecenas eu ante eget augue pulvinar efficitur. Aenean vitae luctus dolor. Ut iaculis orci ut orci tincidunt, id efficitur nulla accumsan. Nullam feugiat porta hendrerit. Pellentesque eget fringilla leo. Quisque laoreet ligula quis consectetur aliquam.</p>

                <p>Nam vel auctor nisl. Cras vel suscipit nibh. Donec nec massa sagittis, vehicula magna ac, scelerisque velit. Etiam mollis felis orci, id placerat ipsum egestas a. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean faucibus vulputate feugiat. Nam condimentum arcu urna, id tincidunt nisl rhoncus quis. Duis mauris mi, dapibus et nisl at, facilisis tristique lectus. Nam vel felis in metus hendrerit placerat ac quis massa. Nam eget turpis nunc. Nullam at tincidunt lacus. Nulla viverra magna in nisi semper, non interdum nunc tempus. In pellentesque porttitor bibendum. Vestibulum blandit congue tempor.</p>

                <p>Aenean sit amet convallis nulla, vel egestas odio. Phasellus molestie mauris enim, ut vestibulum ipsum consequat in. Praesent aliquet posuere porttitor. Integer congue nibh eu massa sagittis pulvinar sit amet vitae libero. Sed iaculis diam ligula, at finibus sapien congue ut. Integer euismod, mauris ut pretium feugiat, massa est commodo erat, et vulputate ex neque in neque. In id pharetra orci, vel feugiat ipsum.</p>
            </div>
        </div>
        <p><a href="#top">Back to top</a></p>
    </div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;600&display=swap');

.page {
    width: 100%;
    max-width: 700px;
    margin: auto;
    padding: 2rem 0;
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}

img {
    display: block;
    width: 100%;
}

.content {
    display: flex;
    margin: 2rem 0;
    
    p:last-child {
        margin: 0;
    }
}

.title {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 4vw;
    font-weight: 600;
    margin: 0 1rem 0 0;
    color: #ccc7bd;
    
    span:last-child {
        font-size: 2vw;
    }
}

iframe {
    width: 100%;
    height: 300px;
    box-shadow: 0px 0px 20px rgb(0 0 0 / 6%);
}
              
            
!

JS

              
                import ASScroll from 'https://cdn.skypack.dev/@ashthornton/asscroll'

// https://github.com/ashthornton/asscroll
const asscroll = new ASScroll()

window.addEventListener('load', () => {
    asscroll.enable()
})
              
            
!
999px

Console