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

              
                <div id="menu">
	<div class="top-bar"></div>
	<svg width="84" height="84" viewBox="0 0 84 84"
     xmlns="http://www.w3.org/2000/svg">
		<path class="mid-bar" fill="none" stroke-width="4px"  stroke-miterlimit="10" d="M22,42h40
																																						 c5,0, 20, -10, 14.641,-20
																																						 A40,40, 0 0 0 42 2 
																																						 A40,40, 0 0 0 2 42	
																																						 A40 40 0 0 0 42 82
																																						 A40 40 0 0 0 82 42
																																						 A40 40 0 0 0 42 2
																																						 A40 40 0 0 0 2 42			
																																			"/>
	</svg>
	<div class="btm-bar"></div>
</div>

<h5>UI Designed by <a href="https://dribbble.com/shots/1623679-Open-Close" target="_blank">UI8</a></h5>
              
            
!

CSS

              
                //animation works on current chrome and firefox, not work on IE and Edge
@import url('https://fonts.googleapis.com/css?family=Ubuntu:300,400')
@mixin openAnimate($degree)
	transform-origin: 40px
	transform: translateX(-4px) rotate($degree)
	transition: all 0.75s cubic-bezier(1, -1.5, 0.5, 2)

body
	background-color: #31aa39


#menu
	margin: 150px auto
	display: block
	width: 84px
	height: 84px
	box-sizing: content-box
	cursor: pointer
	position: relative
	&.open
		.top-bar
			@include openAnimate(-45deg)
		.btm-bar
			@include openAnimate(45deg)
		.mid-bar
			stroke-dasharray: 0 120 251 251
			stroke-dashoffset: 1

.top-bar, .btm-bar
	position: absolute
	width: 43px
	height: 4px
	background: white
	left: 20px
	top: 27px
	border-radius: 10px
	transition: all 500ms cubic-bezier(1, -1, 0.5, 2)

.btm-bar
	top: 53px

.mid-bar
	stroke-linecap: round
	stroke: #fff
	stroke-dasharray: 0 100 40 400
	stroke-dashoffset: 101
	transition: all 750ms ease

h5,a
	color: #00630d
	font-family: 'Ubuntu', sans-serif
	text-decoration: none
	text-align: center

a:hover
	color: white
              
            
!

JS

              
                let menuBtn = document.getElementById('menu');
menu.addEventListener('click', () => {
	menuBtn.classList.toggle('open');
})
              
            
!
999px

Console