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

              
                #app
  .Hamburgers
    .Hamburger#type1(
      @click="opened.type1=!opened.type1"
      :class="{open: opened.type1}"
    )
      span(v-for="i in 3")
    .Hamburger#type2(
      @click="opened.type2=!opened.type2"
      :class="{open: opened.type2}"
    )
      span(v-for="i in 3")
    .Hamburger#type3(
        @click="opened.type3=!opened.type3"
        :class="{open: opened.type3}"
      )
        span(v-for="i in 3")
              
            
!

CSS

              
                .Hamburgers
  padding: 10px
  display: grid
  grid-template-columns: repeat(auto-fit, minmax(50px, 100px))
.Hamburger
  display: grid
  position: relative
  height: 45px
  width: 60px
  cursor: pointer
  span
    position: absolute
    height: 20%
    transition: all .3s ease-out
    transform-origin: left top
    background: tomato
    left: 0
    width: 100%
    border-radius: 3px
    &:nth-child(1)
      top: 0
    &:nth-child(2)
      top: 50%
      transform: translate(0, -50%)
    &:nth-child(3)
      bottom: 0
  &#type1
    &.open
      span:nth-child(1)
        transform: rotate(45deg)
        left: 10%
        top: -5%
        width: 90%
      span:nth-child(2)
        width: 0
        opacity: 0
      span:nth-child(3)
        transform: rotate(-45deg)
        width: 90%
  &#type2
    span
      &:nth-child(1)
        transform-origin: center
        animation-name: accum-top-exit
        animation-duration: .3s
        @keyframes accum-top-exit
          from
            top: 50%
            transform: translate(0, -50%) rotate(-45deg)
          50%
            top: 50%
            transform: translate(0, -50%)
          to
            top: 0
      &:nth-child(3)
        transform-origin: center
        animation-name: accum-bottom-exit
        animation-duration: .3s
        @keyframes accum-bottom-exit
          from
            bottom: 50%
            transform: translate(0, 50%) rotate(45deg)
          50%
            bottom: 50%
            transform: translate(0, 50%)
          to
            bottom: 0
    &.open
      span:nth-child(1)
        top: 50%
        animation-name: accum-from-top
        animation-duration: .3s
        transform-origin: center
        transform: translate(0, -50%) rotate(-45deg)
        @keyframes accum-from-top
          from
            top: 0
            transform: translate(0, 0)
          50%
            top: 50%
            transform: translate(0, -50%)
          to
            transform: translate(0, -50%) rotate(-45deg)
      span:nth-child(2)
        animation-name: accum
        animation-duration: .5s
        opacity: 0
        @keyframes 
          from
            opacity: 1
          to
            opacity: 0
      span:nth-child(3)
        animation-name: accum-from-bottom
        animation-duration: .3s
        bottom: 50%
        transform-origin: center
        transform: translate(0, 50%) rotate(45deg)
        @keyframes accum-from-bottom
          from
            bottom: 0
            width: 100%
            transform: translate(0, 0)
          50%
            bottom: 50%
            transform: translate(0, 50%)
          to
            transform: translate(0, 50%) rotate(45deg)
  &#type3
    span
      &:nth-child(1)
        transform-origin: center
        animation-name: accum-top-exit
        animation-duration: .3s
        @keyframes accum-top-exit
          from
            top: 50%
            transform: translate(0, -50%) rotate(-45deg)
          50%
            top: 50%
            transform: translate(0, -50%)
          to
            top: 0
      &:nth-child(3)
        transform-origin: center
        animation-name: accum-bottom-exit
        animation-duration: .3s
        @keyframes accum-bottom-exit
          from
            bottom: 50%
            transform: translate(0, 50%) rotate(45deg)
          50%
            bottom: 50%
            transform: translate(0, 50%)
          to
            bottom: 0
    &.open
      span:nth-child(1)
        top: 50%
        animation-name: accum-top
        animation-duration: .8s
        transform-origin: center
        transform: translate(0, -50%) rotate(-45deg)
        @keyframes accum-top
          from
            top: 0
            left: 0
            transform: translate(0, 0)
          30%
            left: -50%
          60%
            top: 50%
            transform: translate(0, -50%) rotate(130deg)
          to
            transform: translate(0, -50%) rotate(135deg)
      span:nth-child(2)
        animation-name: accum
        animation-duration: .3s
        width: 0
        left: 50%
        @keyframes accum
          from
            width: 100%
            height: 10%
            left: 0
            opacity: 1
          to
            width: 0
            height: 5%
            left: 50%
            opacity: .5
      span:nth-child(3)
        animation-name: accum-bottom
        animation-duration: .8s
        bottom: 50%
        transform-origin: center
        transform: translate(0, 50%) rotate(45deg)
        @keyframes accum-bottom
          from
            bottom: 0
            width: 100%
            left: 0
            transform: translate(0, 0)
          30%
            left: 50%
          60%
            transform: translate(0, 50%) rotate(-130deg)
            bottom: 50%
          to
            transform: translate(0, 50%) rotate(-135deg)
     

              
            
!

JS

              
                new Vue({
  el: '#app',
  data () {
    return {
      opened: {
        type1: false,
        type2: false,
        type3: false,
        type4: false
      }
    }
  }
})
              
            
!
999px

Console