css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <section>
	<div class="content">
<svg class="hamburger" viewBox="0 0 176 128" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                      <path d="M16,16.0331097 C22.7646264,16.2560482 25.9179163,17.5208378 30.8310697,19.4941744 C37.9862412,22.3636797 46.8892225,25.9329027 63.277651,25.9329027 C79.6733118,25.9329027 88.5787038,22.3636797 95.7338753,19.4963818 C101.174988,17.3177651 104.458459,16 112.843125,16 C121.22779,16 124.508851,17.3177651 129.947552,19.4963818 C136.743519,22.2202044 145.118541,25.5753182 159.988183,25.906415 C160.865704,25.925545 112.869643,52.2900734 16,105"></path>
        <path d="M16,96.0881433 C22.7646264,96.3113534 25.9179163,97.5776843 30.8310697,99.5534256 C37.9862412,102.426428 46.8892225,106 63.277651,106 C79.6733118,106 88.5787038,102.426428 95.7338753,99.5556356 C101.174988,97.3743642 104.458459,96.0549933 112.843125,96.0549933 C121.22779,96.0549933 124.508851,97.3743642 129.947552,99.5556356 C136.743519,102.282777 145.118541,105.64198 159.988183,105.97348 C160.865704,105.992633 112.869643,79.3348067 16,26"></path>
        <path d="M16,59.0333333 C22.7182011,59.2577778 25.8498502,60.5311111 30.7292849,62.5177778 C37.8353508,65.4066667 46.6772314,69 62.953187,69 C79.2363253,69 88.0806001,65.4066667 95.186666,62.52 C100.590436,60.3266667 103.851374,59 112.178495,59 C120.505617,59 123.76416,60.3266667 129.165537,62.52 C135.914863,65.2622222 144.232407,68.64 159,68.9733333"></path>

</svg>
	</div>
</section>
            
          
!
            
              html, body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

body {
	background: #4B384C;
	transition: background 1s cubic-bezier(0.77, 0, 0.175, 1);
	
	&.active-hamburger {
		background: #632C65;
	}
}

section {
	width: 100%;
	height: 100%;
	display: flex;
	
	.content {
		margin: auto;
		display: flex;
		width: 50vh;
		height: 50vh;
	}
}

.hamburger {
	margin: auto;
	width: 50px;
	height: 40px;
	cursor: pointer;
	transition: transform 1s ease;
	
	path {
		transition: stroke-dasharray 1s cubic-bezier(0.77, 0, 0.175, 1);
		stroke-width: 4px;
		stroke-linecap: butt;
		stroke-linejoin: round;
		fill: none;
		fill-rule: evenodd;
		vector-effect: non-scaling-stroke;
		stroke: #E2A9E5;
	
		&:nth-of-type(1) {
			stroke-dasharray: 0px 0px 30px 60px;
		}
		&:nth-of-type(2) {
			stroke-dasharray: 0px 0px 30px 60px;
		}
		&:nth-of-type(3) {
			stroke-dasharray: 0px 0px 30px 100px;
		}
	}
	
	&.is-open {
		transform: translateX(-5px);
		path {
			&:nth-of-type(1) {
			stroke-dasharray: 0px 53px 25px 70px
			}
			&:nth-of-type(2) {
				stroke-dasharray: 0px 53px 25px 70px;
			}
			&:nth-of-type(3) {
				stroke-dasharray: 0px 0px 0px 100px;
			}
		}
	}
}
            
          
!
            
              $( document ).ready(function() {
  $('.hamburger').click(function() {
		$(this).toggleClass('is-open')
		$('body').toggleClass('active-hamburger')
	})
});
            
          
!
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.
Loading ..................

Console