octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              header
	h1 Z<span>A</span>CK<span> E</span>V<span>A</span>NS
	button: i.fa.fa-bars
nav
	ul
		li: a(href="#") videos
		li: a(href="#")  photos
		li: a(href="#")  web
main
	article
		h1 This is a heading
		p.
			Grumpy wizards make toxic brew for the evil Queen and Jack. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked.
		p.
			Grumpy wizards make toxic brew for the evil Queen and Jack. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. 
	article
		h1 This is a heading
		p.
			Grumpy wizards make toxic brew for the evil Queen and Jack. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. 
	article
		h1 This is a heading
		p.
			Grumpy wizards make toxic brew for the evil Queen and Jack. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. 
	article
		h1 This is a heading
		p.
			Grumpy wizards make toxic brew for the evil Queen and Jack. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. 
	article
		h1 This is a heading
		p.
			Grumpy wizards make toxic brew for the evil Queen and Jack. One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly.
            
          
!
            
              @import 'https://fonts.googleapis.com/css?family=Lato|Philosopher';
@import url(//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css);

$heading_font: Philosopher;
$body_font: Lato;

*, *:before, *:after {
	box-sizing: border-box;
}

html, body {
	height: 100%;
}

body {
	background: #292929;
	perspective: 800px;
}

header {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	padding: 1em;
	h1 {
		color: #ecf0f1;
		flex-basis: 100%;
		font-family: Philosopher;
		text-align:center;
		margin: 0;
		font-size: 4rem;
		span {
			opacity: .1;
		}
	}
	button {
		width: 3.5em;
		height: 3.5em;
		border-radius: 3.5em;
		border: 0;
		background: #fff;
		margin: 1em;
		box-shadow: 1px 2px 6px 0 rgba(0, 0, 0, .1);
		&:hover {
			background: #fffc72;
		}
		&:focus {
			outline: 0;
		}
	}
}

.fa-bars, .fa-times {
	font-size: 2rem;
	color: #292929;
}

nav {
	position: fixed;
	z-index: 10;
	width: 100%;
	top: 11em;
	padding: 2rem;
	ul {
		list-style-type: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		transition: background .2s;
		li {
			flex-basis: 33.33333%;
			transform: translateY(-30em);
			transition: all .4s ease;
			opacity: 0;
			@media (max-width: 560px) {
				flex-basis: 100%;
			}
			text-align: center;
			a {
				font-family: $heading_font;
				font-size: 4rem;
				@media (max-width: 1260px) {
					font-size: 2rem;
				}
				text-decoration: none;
				color: #fff;
				letter-spacing: .1em;
				&:hover {
					color: #fffc72;
					position: relative;
					&:after {
						position: absolute;
						left: 50%;
						transform: translateX(-50%);
						content: '';
						display: block;
						border: 1px dashed #fff;
						border-left: 0;
						border-right: 0;
						border-top: 0;
						width: 100%;
					}
				}
				&:focus {
					outline: 0;
					border: 1px dotted #fff;
					color: #fffc72;
					padding: .25em;
				}
			}
		}
	}
}

main {
	background: #ecf0f1;
	min-height: 100%;
	transition: transform .4s;
	transform-origin: 50% 100%;
	padding: 2em;
	article {
		max-width: 60em;
		@media (max-width: 700px) {
			width: 100%;
		}
		padding: 3em;
		background: #fff;
		box-shadow: 1px 2px 6px 0 rgba(0, 0, 0, .1);
		margin: 0 auto 2em auto;
		&:last-child {
			margin-bottom: 0;
		}
		h1 {
			margin: 0;
			font-family: $heading_font;
			font-size: 2.5rem;
		}
		p {
			font-family: $body_font;
			font-size: 1.5rem;
		}
	}
}

.active {
	transform: rotateX(20deg);
	transform-origin: 50% 100%;
	transition: 1s;
}

.nav-visible {
	padding: 1em 0;
	background: #292929;
	transition: background 1s;
	transition-delay: 1s;
	li {
		transform: translateY(0em);
		transition: all 1s ease;
		opacity: 1;
		&:nth-child(1) { transition-delay: .1s; }
		&:nth-child(2) { transition-delay: .2s; }
		&:nth-child(3) { transition-delay: .3s }
	}
}
            
          
!
            
              var content = $('main');
$('button').click(function() {
	($('i').hasClass('fa-bars')) ? $('i').removeClass('fa-bars').addClass('fa-times') : $('i').removeClass('fa-times').addClass('fa-bars');
	$('ul').toggleClass('nav-visible');
	content.toggleClass('active');
});

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console