123

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.

            
              <body>
	<header class="">
			<div id="nav-wrap" class="nav-wrap">
		<nav id="nav" class="nav">
			<div class="mark">
				<div class="container">
  <svg id="bird" version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 515 515">
    <path id="wing_b" d="M55 50 L375 300 L207 402Z" d2="M190 510 L375 280 L210 380Z"/>
    <path id="head" d="M380 195 L488 252 L375 263Z" d2="M380 195 L478 252 L375 263Z"/>
    <path id="body" d="M20 516 L380 195 L375 300Z" d2="M20 496 L380 195 L375 280Z"/>
    <path id="wing_f" d="M375 300 L220 394 L120 0Z" d2="M375 280 L210 380 L310 500Z"/>
  </svg>
</div>
			</div>
			<ul>
			<li>
				<a>Never Land</a>
			</li>
			<li>
<a>Aladins Cave</a>
			</li>
			<li>
<a>Skyfall</a>
			</li>
		</ul>
		</nav>
		</div> <!-- .nav-wrap -->
		
	</header>
	<main style="width: 100%; height: 100%; width: 700%; height: 900px; background-color: #685454">
		
		<a id="toggle" class="close">
			<div class="hamburger ">
			<div class="line"></div>
			<div class="line"></div>
			<div class="line"></div>
		</div>
		</a>
		<section>
			<h5>	I sugest resizing the view port to a mobile size then hover and click on menu and enjoy effects. </h5>
		</section>
	</main >
</body>
<!-- <section id="acknowledgment"> 
	<h4>Acknowledgements</h4>
	<p>This project would not be possible without the wonderful opensource communities from around the web.</p>
	<p>Below is the list of sources for various resources used</p>
	<div>
	<ul>
		<li>
			<a href="https://codepen.io/jboeijenga/pen/PqPXBq">SVG origami bird by Jasper
			</a>
				
		</li>
	</ul>
	</div>
</section>		 -->
		

            
          
!
            
              body {
	display: flex;
	flex-direction: row-reverse;
	header {
		background-color: $color-palette-a;
		nav {
			background-color: $color-palette-a;
			justify-content: space-between;
			height: 100%;
			transition: all 0.2s linear;
			ul {
				li {
					padding: 1.5rem;
				}
			}
			a {
				color: $color-palette-d;
				font-size: 1.3em;
				transition: all 0.2s ease-in-out;
			}
			a:hover {
				color: $color-palette-b;
				border-bottom: 5px dashed $color-palette-b;
			}
		}
	}
	section {
		background-color: lightsteelblue;
		padding: 2rem;
	}
}

// Nav Mark
.mark {
	svg {
		padding: 1rem;
		height: 3rem;
		path {
			fill: $color-palette-c;
		}
	}
}
// HIDE SIDEBAR
.nav-wrap {
	flex: 0 0 0;
	width: 0px;
	overflow: hidden;
	transition: all 0.2s ease-out;
}

.nav-wrap.show {
	flex: 0 0 20em;
	width: 200px;
	overflow: show;
}

#toggle {
	display: inline-block;
	float: right;
	// background-color: $color-palette-b;
	padding: 0.8rem 0.5rem;
	cursor: pointer;
	transition: background 0.2s ease-in-out;
	color: $light-1;
	font: {
		size: 1.4rem;
	}
}

.hamburger {
	padding: 1rem;
	width: 3rem;
	margin: auto;

	.line {
		margin-top: 0.3rem;
		width: 3rem;
		border-radius: 5px;
		padding: 0.1rem;
		height: 0.2rem;
		background-color: $color-palette-a;
		transition: all 0.2s ease-in-out;
	}
}

#toggle.open {
	padding: 0.1rem 0.1rem;
	.hamburger {
		.line:first-child {
			background-color: $color-palette-a;
			transform: rotate(45deg) translate(2px, 18px);
		}
		.line:nth-child(2) {
			opacity: 0;
		}
		.line:last-child {
			background-color: $color-palette-a;
			transform: rotate(-45deg) translate(-3px, -15px);
		}
	}
}
#toggle.close {
	.hamburger:hover {
		.line:first-child {
			width: 2rem;
			background-color: $color-palette-a;
			transform: rotate(45deg) translate(9px, -12px);
		}
		.line:nth-child(2) {
			transform: translateX(-2px);
		}
		.line:last-child {
			width: 2rem;
			background-color: $color-palette-a;
			transform: rotate(-45deg) translate(10px, 12px);
		}
	}
}

@media screen and (min-width: 700px) {
	body {
		display: flex;
		flex-direction: column;
		nav {
			display: flex;
			justify-content: space-between;
			ul {
				display: flex;
				justify-content: space-around;
				li {
					padding: 1.5rem;
				}
			}
		}
	}
	.nav-wrap {
		flex: 0 0 20em;
		width: 100%;
		transition: all 0.2s ease-out;
	}

	.nav-wrap.show {
		flex: 0 0 20em;
		width: 200px;
		overflow: show;
	}
	#toggle {
		display: none;
	}
}

            
          
!
            
              
const MOBILENAV = document.getElementById("nav-wrap");
const TOGGLENAV = document.getElementById("toggle");
	console.log(MOBILENAV.className);
TOGGLENAV.addEventListener("click", function() {
	console.log(MOBILENAV.className);
	if (MOBILENAV.className === "nav-wrap") {
		TOGGLENAV.className = 'open';
		MOBILENAV.className = "nav-wrap show";
	} else {
		TOGGLENAV.className = 'close';
		MOBILENAV.className = "nav-wrap";
	}
		console.log(MOBILENAV.className);
});


            
          
!
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