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="snap">
        <section class="snap1">
            <p>SECTION 01</p>
        </section>
        <section class="snap2">
            <p>SECTION 02</p>
        </section>
        <section class="snap3">
            <p>SECTION 03</p>
        </section>
        <section class="snap4">
            <p>SECTION 04</p>
        </section>
    </div>
              
            
!

CSS

              
                .snap {
    overflow: auto;
    height: 100vh;
    /* y軸方向にピタッと移動する */
    scroll-snap-type: y mandatory;
    /* スクロールバーを非表示にする(Safariは不可) */
    scrollbar-width: none; 
}

/* スクロールバーを非表示にする(Firefoxは不可) */
.snap::-webkit-scrollbar {
    display: none; 
}

.snap section {
    width: 100%;
    height: 100vh;
    /* 次のコンテンツの開始位置に移動 */
    scroll-snap-align: start;
}

.snap p {
    font-family: "Anton", sans-serif;      
    font-size: 50px;
    letter-spacing: 0.05em;
}

.snap1 {
    background-color: #3EE2FF;
}

.snap2 {
    background-color: #FFEF37;
}
.snap3 {
    background-color: #00D6B5;
}
.snap4 {
    background-color: #CF2E2E;
}

/* レイアウトのためのCSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    font-size: 16px;
}

section {
    padding: 40px;
}
              
            
!

JS

              
                
              
            
!
999px

Console