Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <div class="icon-wrapper">
  
  <div class="icon burger">
    <div class="bun-top"></div>
    <div class="patty"></div>
    <div class="bun-bottom"></div>
  </div>
  
  <div class="icon icon-chat">
    <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <g id="chat" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
            <path d="M0,3 L0,24 L6,24 L6,32 L16.909,24 L31,24 L31,3 L0,3 Z M3,6 L28,6 L28,21 L16.909,21 L15.926,21 L15.134,21.581 L9,26.08 L9,24 L9,21 L6,21 L3,21 L3,6 Z" id="Fill-1" fill="#333"></path>
        </g>
    </svg>
    <div class="chat-dot-1st"></div>
    <div class="chat-dot-2nd"></div>
    <div class="chat-dot-3rd"></div>    
  </div>

  <div class="icon icon-user">
        <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <g id="user" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
            <path d="M12,13 C12,10.794 13.794,9 16,9 C18.206,9 20,10.794 20,13 C20,15.206 18.206,17 16,17 C13.794,17 12,15.206 12,13 M20.701,18.175 C22.11,16.895 23,15.054 23,13 C23,9.134 19.866,6 16,6 C12.134,6 9,9.134 9,13 C9,15.054 9.89,16.895 11.299,18.175 C8.146,19.858 6,23.177 6,27 L9,27 C9,23.14 12.141,20 16,20 C19.859,20 23,23.14 23,27 L26,27 C26,23.177 23.854,19.858 20.701,18.175" id="Fill-1" fill="#333"></path>
        </g>
    </svg>
    <div class="user-bling-1"></div>
    <div class="user-bling-2"></div>
    <div class="user-bling-3"></div>
  </div>

  <div class="icon icon-pen">
    <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <g id="user" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M3.02215501,25.977845 L5.15914131,25.977845 L21.7260274,9.4109589 L19.5890411,7.2739726 L3.02215501,23.8408587 L3.02215501,25.977845 Z M4.4736881e-16,22.5890411 L19.5890411,3 L26,9.4109589 L6.4109589,29 L0,29 L4.4736881e-16,22.5890411 Z" id="Rectangle-5" fill="#333" fill-rule="nonzero"></path>
    </g>
</svg>
    <div class="line"></div>
  </div>

<div class="icon icon-star">
  <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <g id="star" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M7,14.5393179 L11.2020391,18.6369389 C11.3881988,18.8162428 11.4736318,19.079925 11.4298605,19.3330599 L10.4373608,25.1182468 L15.6318997,22.3864995 C15.8623579,22.2652057 16.1376421,22.2652057 16.3681003,22.3864995 L21.5621118,25.1182468 L20.5706668,19.3330599 C20.5263682,19.079925 20.6118012,18.8162428 20.7979609,18.6369389 L25,14.5393179 L19.1926638,13.695535 C18.9347826,13.6586195 18.7122349,13.4951365 18.5967421,13.2630962 L16,8 L13.4027306,13.2630962 C13.2872378,13.4951365 13.06469,13.6586195 12.8073362,13.695535 L7,14.5393179 Z M12.3813684,10.7259304 C12.3786886,10.7263148 12.3760104,10.7267039 12.3733335,10.7270978 L12.3813684,10.7259304 Z M11.2265795,10.8937156 L16.0002732,1.22032231 L18.6903606,6.67261166 L20.7729451,10.8936426 L31.4454294,12.4443123 L27.0944662,16.6871567 L23.7241812,19.9736282 L25.5458166,30.6030646 L20.1656503,27.7734107 L15.9999479,25.5824939 L6.45250945,30.6033803 L7.48055822,24.6109813 L8.27608376,19.9739505 L0.554570578,12.4443123 L6.56864129,11.5704916 L11.2265795,10.8937156 Z M19.6240225,10.7267087 L19.6332024,10.7280425 C19.6301443,10.7275915 19.6270843,10.7271469 19.6240225,10.7267087 Z M8.47372945,18.8218956 C8.47339367,18.8238374 8.4730605,18.8257794 8.47272996,18.8277215 L8.47372945,18.8218956 Z" id="4J" fill="#333" fill-rule="nonzero"></path>
    </g>
 </div>
</div> 
            
          
!
            
              body {
  width: 100%;
  height: 100%;
  background: #03fe7f;
}

.icon-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  
  .icon {
    margin: 0 20px;
  }
}

// Burger ##########################
.burger {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer;
  
  .bun-top,
  .patty,
  .bun-bottom {
    position: absolute;
    width: 32px;
    height: 3px;
    margin-left: 16px;
    background: #333;
    transition: transform .2s;
  }
  
  .bun-top {
    transform: translate(-16px, 5px);
  }
  
  .patty {
    transform: translate(-16px, 14px);
  }
  
  .bun-bottom {
    transform: translate(-16px, 23px);
  }
  
  &:hover .bun-top {
    transform: translate(-16px, 2px);
  }
  
  &:hover .bun-bottom {
    transform: translate(-16px, 26px);
  }
  
  // Active state ####################
  &.open .bun-top {
    transform: translate(-16px, 14px) rotate(45deg);
  }
  
  &.open .patty {
    opacity: 0;
  }
  
  &.open .bun-bottom {
    transform: translate(-16px, 14px) rotate(-45deg);
  }
}

// Chat ########################
.icon-chat {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer;
  
  svg {
    position: absolute; 
  }
  
  .chat-dot-1st,
  .chat-dot-2nd,
  .chat-dot-3rd {
    width: 3px;
    height: 3px;
    background: #333;
    position: absolute;
    top: 12px;
    opacity: 0;
    transition: opacity .2s;
  }
  
  .chat-dot-1st {
    left: 8px;
    transition-delay: .2s;
  }
  
  .chat-dot-2nd {
    left: 14px;
    transition-delay: .1s;
  }
  
  .chat-dot-3rd {
    left: 20px;
    transition-delay: 0s;
  }
  
  &:hover .chat-dot-1st,
  &:hover .chat-dot-2nd,
  &:hover .chat-dot-3rd {
    opacity: 1;
  }
  
  &:hover .chat-dot-1st {
    transition-delay: 0s;
  }
  
  &:hover .chat-dot-2nd {
    transition-delay: .1s;
  }
  
  &:hover .chat-dot-3rd {
    transition-delay: .2s;
  }
}

// User ########################

.icon-user {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer; 
  
  svg {
    position: absolute; 
  }
  
  .user-bling-1,
  .user-bling-2,
  .user-bling-3 {
    position: absolute;
    opacity: 0;
    width: 3px;
    height: 6px;
    background: #333;
    transition: all .2s;
  }
  
  .user-bling-1 {
    left: 7px;
    top: 1px;
    transform: rotate(-45deg);
  }
  
  .user-bling-2 {
    left: 14px;
    top: -1px;
  }
  
  .user-bling-3 {
    left: 21px;
    top: 1px;
    transform: rotate(45deg);
  }
  
  &:hover .user-bling-1,
  &:hover .user-bling-2,
  &:hover .user-bling-3 {
    opacity: 1;
  }
  
  &:hover .user-bling-1 {
    left: 5px;
    top: -1px;
  }
  
  &:hover .user-bling-2 {
    left: 14px;
    top: -4px;
  }
  
  &:hover .user-bling-3 {
    left: 23px;
    top: -1px;
  }
}

// Pen ########################

.icon-pen {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer;
  
  svg {
    position: absolute;
    transition: all .2s;
  }
  
  .line {
    position: absolute;
    width: 0px;
    height: 3px;
    top: 26px;
    background: #333;
    opacity: 0;
    transition: all .2s;
  }
  
  &:hover svg {
    transform: translate(21px, 0px);
  }
  
  &:hover .line {
    width: 24px;
    opacity: 1;
  }
}

// Star ########################

.icon-star {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer;
  
  svg {
    position: absolute;
    transition: all .2s;
  }
  
  &:hover svg {
    transform: rotate(-73deg) scale(1.2);
  }
}
            
          
!
            
              
$( "div.burger" ).click(function() {
  $( this ).toggleClass( "open" );
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console