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 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

Packages

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.

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

              
                <main class="main">
	<section class="svg-wrapper">
		<svg width="65" height="120" viewBox="0 0 65 120" preserveAspectRatio="xMinYMin meet" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
	<path class="bun-bottom" fill="#e9892f" d="M60 77 L60 82 Q60 90 52 90 L13 90 Q5 90 5 82 L5 77 60 77"/>
	<path class="mustard-bottom" fill="#f6cc14" d="M60 77.05 L5 77.05 5 75.05 60 75.05 60 77.05"/>
	<path class="burger" fill="#8c5429" d="M60 62 Q62.05 62 63.5 63.45 65 64.95 65 67 L65 70 Q65 72.05 63.5 73.5 62.05 75 60 75 L5 75 Q2.95 75 1.45 73.5 0 72.05 0 70 L0 67 Q0 64.95 1.45 63.45 2.95 62 5 62 L60 62"/>
	<path class="cheese" fill="#f6cc14" d="M5 59 L60 59 60 62 48 62 41.5 68.5 35 62 5 62 5 59"/>
	<path class="tomato" fill="#e03a21" d="M5 53 L60 53 60 59 5 59 5 53"/>
	<path class="lettuce" fill="#8ab322" d="M3 50 L62 50 62 53 3 53 3 50"/>
	<path class="mayo" fill="#f0c48d" d="M53.8 50 Q53.35 53.4 50.8 55.9 47.75 59 43.4 59 39.05 59 35.95 55.9 33.45 53.4 33 50 L19.45 50 Q19.1 51.25 18.1 52.2 16.6 53.75 14.4 53.75 12.25 53.75 10.7 52.2 9.75 51.25 9.4 50 L5 50 5 46 60 46 60 50 53.8 50"/>
	<path class="mustard-top" fill="#f6cc14" d="M5 44.05 L60 44.05 60 46.05 5 46.05 5 44.05"/>
	<g class="bun-top">
		<path fill="#e9892f" d="M60 38 L60 44 5 44 5 38 Q5 30 13 30 L52 30 Q60 30 60 38"/>
		<path fill="#f4c89f" d="M26.25 41.5 L23 38.25 26.25 35 29.5 38.25 26.25 41.5"/>
		<path fill="#f4c89f" d="M13 35.25 L16.25 32 19.5 35.25 16.25 38.5 13 35.25"/>
		<path fill="#f4c89f" d="M33 35.25 L36.25 32 39.5 35.25 36.25 38.5 33 35.25"/>
		<path fill="#f4c89f" d="M46.25 34 L49.5 37.25 46.25 40.5 43 37.25 46.25 34"/>
	</g>
</svg>	</section>
  <h2>Cleeek the buuurrrger</h2>
</main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Orelega+One');

body {
  display: flex;
  min-height:	100vh;
  margin: 0;
  padding: 1rem;
  color: #FFFFFF;
  background-color:	#16a085;
  font-family: 'Orelega One';
}

.main {
  margin: auto;
}

svg {
  display: block;
  margin: auto;
}

* {
  box-sizing: border-box;
}
              
            
!

JS

              
                jQuery(document).ready(function($) {

	//	Let's go!

	let burgerTL = gsap.timeline({ paused: true }).timeScale(1);
	burgerTL.to('.bun-top', { yPercent: -100, duration: 0.5, ease: 'back.out(3)' });
	burgerTL.to('.bun-bottom', { yPercent: 100, duration: 0.5, delay: -0.5, ease: 'back.out(3)' });
	burgerTL.to('.mustard-top', { yPercent: -500, duration: 0.5, delay: -0.45, ease: 'back.out(3)' });
	burgerTL.to('.mustard-bottom', { yPercent: 500, duration: 0.5, delay: -0.45, ease: 'back.out(3)' });
	burgerTL.to('.burger', { yPercent: 50, duration: 0.5, delay: -0.4, ease: 'back.out(3)' });
	burgerTL.to('.mayo', { yPercent: -50, duration: 0.5, delay: -0.4, ease: 'back.out(3)' });
	burgerTL.to('.cheese', { yPercent: 35, duration: 0.5, delay: -0.35, ease: 'back.out(3)' });
	burgerTL.to('.lettuce', { yPercent: -100, duration: 0.5, delay: -0.35, ease: 'back.out(3)' });

	$('svg').click(function(evt) {
		$('svg').toggleClass('clicked');

		if ($('svg').hasClass('clicked')) {
			burgerTL.play();
		} else {
			burgerTL.reverse();
		}
	});
});
              
            
!
999px

Console