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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                h1 Pure CSS
  br
  | Hamburger

input#toggle(type='checkbox')
label.hamburger(for='toggle')
  .top
  .meat
  .bottom
  
.nav
  .nav-wrapper
    nav
      a(href='#') Home
      a(href='#') About
      a(href='#') Blog
      a(href='#') Contact

              
            
!

CSS

              
                * 
  box-sizing: border-box

body
  width: 80vw
  margin: 0 auto
  background: #eee
  color: darkblue
  text-align: center
  overflow: hidden
  padding: 0

h1
  text-align: center
  letter-spacing: 3px
  font-size: 4em
  margin-top: 30vh
  line-height: 1.3
  overflow: hidden
  text-overflow: ellipsis
  @media only screen and (max-width: 480px)
    font-size: 2em


.hamburger
  position: absolute
  width: 50px
  height: 45px
  top: 10px
  right: 20px
  z-index: 5

  div
    position: relative
    width: 50px
    height: 5px
    border-radius: 3px
    background-color: #94a9ff
    margin-top: 7px
    transition: all 0.3s ease-in-out

#toggle
  display: none
  
#toggle:checked + .hamburger
  .top
    transform: rotate(-45deg)
    margin-top: 22.5px
  .meat
    transform: rotate(45deg)
    margin-top: -5px
  .bottom
    transform: scale(0)
  & + .nav
    top: 0
    
.nav
  position: fixed
  width: 100%
  height: 100%
  background-color: darkblue
  top: -100%
  left: 0
  right: 0
  bottom: 0
  overflow: hidden
  transition: all 0.3s ease-in-out

  .nav-wrapper
    position: relative
    overflow-y: auto
    height: 100%

nav
  height: 100vh
  display: flex
  flex-direction: column
  align-items: center
  justify-content: center
  
  a
    margin-top: 1.25em
    color: #eee
    opacity: 0
    text-decoration: none
    font-size: 2.3em
    letter-spacing: 3px
    transition: all 0.1s ease
    
    &:first-child
      margin-top: 0
    
#toggle:checked + .hamburger + .nav
  .nav-wrapper nav a
    opacity: 0.9
    transform: scale(1)
    
    &:hover
      opacity: 1
      color: white
      transform: scale(1.2)
        
              
            
!

JS

              
                
              
            
!
999px

Console