cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

            
              <nav>
	<ul>
		<li>Home</li>
		<li>About</li>
		<li>Contacts</li>
		<li>Magic</li>
		<li>Settings</li>
	</ul>
</nav><div class="bodyContainer">
	<h1>Navigation.</h1>
	<h4>By <a href="https://www.linkedin.com/in/giorgioacquati/">Giorgio Acquati.</a></h4>
	<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Optio modi eligendi eveniet ullam maiores esse dolor illo voluptatum placeat doloribus obcaecati ab cum, magnam officia quis explicabo vel mollitia enim.</p>
	<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, nam quas? In sint enim libero repellendus? Quis dicta, repellendus consequatur ratione, asperiores ut incidunt aperiam voluptates tempora cum sunt ex!</p>
	<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam cupiditate, libero odio quam deserunt expedita excepturi aliquid odit, error a quas. Ullam inventore earum sed eaque natus sequi, distinctio minus?</p>
	<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis voluptatem delectus harum quis minus sed optio, laudantium, qui quo incidunt vitae, doloremque nostrum quidem magnam facilis explicabo impedit nemo. Dolore.</p>
	<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eveniet possimus incidunt laboriosam nostrum officiis quaerat deleniti quisquam neque? Similique, assumenda saepe. Consequatur reiciendis atque eligendi quia veniam iusto minus praesentium!</p>
</div>
	<div class="hamburger">
		<span></span>
		<span></span>
		<span></span>
	</div>

            
          
!
            
              $raisinblack: #262626;
$isabelline: #fafafa;
$accent: #00c7be;

* {
	margin: 0;
	padding: 0;
}

html {
	font-size: 24px;
	font-family: sans-serif;
}

body {
	background-color: $accent;
}

nav {
	position: fixed;
	height: 100%;
	width: 65%;
	&::before {
		content: '';
		display: inline-block;
		width: 0;
		height: 100%;
		vertical-align: middle;
	}
	> ul {
		width: 80%;
		display: inline-block;
		vertical-align: middle;
		> li {
			display: block;
			text-transform: uppercase;
			line-height: 2;
			font-size: .8rem;
			padding-left: 30%;
		}
	}
}

.hamburger {
	left: 1rem;
	top: 1rem;
	width: 1.5rem;
	height: .7rem;
	position: fixed;
	z-index: 2;
	cursor: pointer;
	> span {
		display: block;
		background-color: $raisinblack;
		height: 20%;
		margin-bottom: 20%;
	}
	
	
	
}
.bodyContainer {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: $isabelline;
	color: $raisinblack;
	padding: 4rem;
	overflow: auto;
	transition: .2s ease;
	
	@media screen and (orientation: portrait) {
		padding: 4rem 1rem;
	}
	
	a {
		color: $accent;
	}
	
	> p {
		padding-bottom: 1em;
	}
	
	> h4 {
		margin: 1em 0;
	}
	
}

@media screen and (orientation: portrait) {
	nav.active + .bodyContainer {
		transform: translateX(55%) scale(.8);
		box-shadow: 0 0 30px 5px rgba($raisinblack, .3);
	}
}

@media screen and (orientation: landscape) {
	nav.active + .bodyContainer {
		transform: translateX(35%) scale(.8);
		box-shadow: 0 0 30px 5px rgba($raisinblack, .3);
	}
}


            
          
!
            
              $(".hamburger").click(function() {
	$("nav").toggleClass("active");
})
            
          
!
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