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 id="container">
    
    <main>
        ▼ コンテンツA<br><br><br><br><br><br><br><br>
        ▼ コンテンツB<br><br><br><br><br><br><br><br>
        ▼ コンテンツC<br><br><br><br><br><br><br><br>
        ▼ コンテンツD<br><br><br><br><br><br><br><br>
        ▼ コンテンツE<br><br><br><br><br><br><br><br>
        ▼ コンテンツF<br><br><br><br><br><br><br><br>
        ▼ コンテンツG<br><br><br><br><br><br><br><br>
    </main>
    
    <div id="side-menu">
      <nav>
        <ul>
          <li>メニューA</li>
          <li>メニューB</li>
          <li>メニューC</li>
        </ul>
      </nav>
    </div>
    
</div>
              
            
!

CSS

              
                /* グリッドレイアウト */
#container{
	display: flex;                    /* 要素の並列表示 */
	justify-content: center;          /* 並列要素同士の位置 */
	flex-wrap: wrap;                  /* 並列要素の折り返し */
}

/* サイドエリア全体の設定 */
#side-menu{
	width:200px;                      /* 横幅 */
}

/* サイドメニューの設定 */
nav{
	position: sticky;                 /* 位置固定    */
	top: 25px;                        /* 固定位置-縦 */
  border: solid;                    /* 枠線        */
}

main{
  padding: 0px 15px 0px 0px;
}
              
            
!

JS

              
                
              
            
!
999px

Console