Pen Settings



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


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


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.


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.


  <div id="nav-drawer">
    <input id="nav-input" type="checkbox" class="nav-unshown">
    <label id="nav-open" for="nav-input"><span></span></label>
    <label class="nav-unshown" id="nav-close" for="nav-input"></label>
    <div id="nav-content">
      <label class="nav-unshown" id="nav-close" for="nav-input">
        <img src="" alt="閉じる">
        <li><a href="">メニュー1</a></li>
        <li><a href="">メニュー2</a></li>
        <li><a href="">メニュー3</a></li>
        <li><a href="">メニュー4</a></li>


  position: relative
    position: absolute
    top: 1.8em
    right: .5em
    display: none
    display: inline-block
    width: 30px
    height: 22px
    vertical-align: middle
  #nav-open span, #nav-open span:before, #nav-open span:after /*ハンバーガーアイコン*/
    position: absolute
    height: 3px
    width: 25px
    border-radius: 3px
    background: black
    display: block
    content: ''
    cursor: pointer
  #nav-open span:before
    bottom: -8px
  #nav-open span:after
    bottom: -16px
    display: none
    position: fixed
    z-index: 99
    height: 100%
    width: 2em
    height: 2em
    top: 1em
    right: 1em
    display: inline-block
    padding: 10px 3px
    z-index: 9
    cursor: pointer
    animation: animScale 2s ease 0s 1 normal
    overflow: auto
    position: fixed
    top: 0
    right: 0
    z-index: 9
    width: 100%
    height: 100%
    color: white
    background: black
    transition: .3s ease-in-out
    transform: translateX(105%) //左に隠しておく
      padding: 3em 2em 2em
      font-size: 1.5em
      text-align: center
      padding: 1em 0
  #nav-input:checked ~ #nav-close
    display: block
  #nav-input:checked ~ #nav-content
    -webkit-transform: translateX(0%)
    transform: translateX(0%) //中身を表示させる
    box-shadow: 6px 0 25px rgba(0,0,0,.15)