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.

            
              .oop

.header
	h1.heading Pure CSS Navigation
		br
		small Simple & Easy, Scroll down to view

.mobile
	.mobile-body
		.navbar
			div.logo
				a(href="#") Grey Shades
			button(type="button", class="burger")
				span
				span
				span
			
			ul.menu
				li Home
				li Work
				li About
				li Contact Me
				
		.container
				
			h2 The Elephant Rope
			
			p As a man was passing the elephants, he suddenly stopped, confused by the fact that these huge creatures were being held by only a small rope tied to their front leg. No chains, no cages. It was obvious that the elephants could, at anytime, break away from their bonds but for some reason, they did not.

			p He saw a trainer nearby and asked why these animals just stood there and made no attempt to get away. “Well,” trainer said, “when they are very young and much smaller we use the same size rope to tie them and, at that age, it’s enough to hold them. As they grow up, they are conditioned to believe they cannot break away. They believe the rope can still hold them, so they never try to break free.”

			p The man was amazed. These animals could at any time break free from their bonds but because they believed they couldn’t, they were stuck right where they were.

			p Like the elephants, how many of us go through life hanging onto a belief that we cannot do something, simply because we failed at it once before?

			p Failure is part of learning; we should never give up the struggle in life.
            
          
!
            
              * {
	&, &:before, &:after {
		moz-box-sizing: border-box;
		box-sizing: border-box;
	}
}

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

body {
	font-family: "Inconsolata", sans-serif;
	font-size: 14px;
	padding: 0 0 40px 0;
	margin: 0;
}

.mobile {
	width: 2.35in;
	height: 4.87in;
	margin: 0 auto;
	background: #222;
	border-radius: 25px;
	padding: 50px 5px;
	box-shadow: 0px 30px 40px rgba(0,0,0,0.2);
	
	.mobile-body {
		background: #fff;
		height: 100%;
		padding-top: 40px;
		// box-shadow: inset 0px 0px 2px rgba(0,0,0,1);
		border-radius: 4px;
		position: relative;
	}
}

.container {
	overflow-y: scroll;
	height: 327px;
	padding: 5px;
	background: #f6f6f6;
	line-height: 1.4;
	
	&::-webkit-scrollbar {
		width: 5px;
	}

	&::-webkit-scrollbar-track {
		-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
		border-radius: 10px;
	}

	&::-webkit-scrollbar-thumb {
		border-radius: 10px;
		-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
	}
}

// no of use
.oop {
	position: relative;
	z-index: auto;
	height: 10px;
	background: linear-gradient(141deg, #48ded4 0%, #a026bf 51%, #e82c75 75%);
	margin-bottom: 20px;
}

.header {
	height: 100vh;
	display: table;
	width: 100%;
}

.heading {
	display: table-cell;
	vertical-align: middle;
	font-size: 2.3em;
	letter-spacing: 5px;
	text-align: center;
	font-weight: 200;
	text-transform: uppercase;
	color: #333;
	position: relative;
	
	small {
		font-size: 50%;
	}
}

// navbar styles

.navbar {
	background: #fff;
	border-radius: 4px;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	box-shadow: 0px 1px 6px rgba(0,0,0,0.2);
	width: 100%;
	
	.logo {
		padding: 12px 5px 12px 35px;
		
		a {
			text-decoration: none;
			color: #333;
			font-size: 1em;
		}
	}
	 
	// instead button you can use checkbox to toggle menu with same click. I'm using button focus state to open the menu.
	
	button.burger {
		position: absolute;
		left: 0;
		top: 0;
		border: 0;
		background: transparent;
		padding: 8px 15px;
		pointer: cursor;
		outline: none;
		span {
			display: block;
			width: 4px;
			height: 4px;
			background: #000;
			margin: 3px 0;
			border-radius: 4px;
			transition: all .4s ease-in-out;
		}
		
		// Rotate first and last span
		
		&:focus {
			span:first-child {
				transform-origin: 2px 9px;
				transform: rotate(-90deg);
			}
			span:last-child {
				transform-origin: 2px -5px;
    			transform: rotate(-90deg);
			}
		}
		
		&:focus + ul {
			max-height: 500px;
		}
	}
	
	// nav menu
	
	ul.menu {
		list-style: none;
		padding: 0;
		margin: 0;
		overflow: hidden;
		max-height: 0;
		transition: all 0.6s ease-in-out;
		
		> li {
			display: block;
			padding: 10px 15px;
			transition: all 0.2s ease;
			
			&:hover {
				background: linear-gradient(141deg, #48ded4 0%, #a026bf 51%, #e82c75 75%);
				color: #fff;
			}
		}
	}
}

// feel free to modify. Thanks for watching :)
            
          
!
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