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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <body>
    <!-- Push in from left -->
		<nav id="pushLeft">
			<ul>
				<li>One</li>
				<li>Two</li>
				<li>Three</li>
				<li>Four</li>
				<li>Five</li>
			</ul>
		</nav>
		<!-- Push in from top -->
		<nav id="pushTop">
			<ul>
				<li>One</li>
				<li>Two</li>
				<li>Three</li>
				<li>Four</li>
				<li>Five</li>
			</ul>
		</nav>
		<!-- Slide over from left -->
		<nav id="slideLeft">
			<ul>
				<li>One</li>
				<li>Two</li>
				<li>Three</li>
				<li>Four</li>
				<li>Five</li>
			</ul>
		</nav>
		<!-- Rotate in top to left -->
		<nav id="rotateTopLeft">
			<ul>
				<li>One</li>
				<li>Two</li>
				<li>Three</li>
				<li>Four</li>
				<li>Five</li>
			</ul>
		</nav>
		<!-- Flip in left -->
		<nav id="flipIn">
			<div class="content">
				<div class="front">Flip menu</div>
				<div class="back">
					<ul>
						<li>One</li>
						<li>Two</li>
						<li>Three</li>
						<li>Four</li>
						<li>Five</li>
					</ul>
				</div>
			</div>
		</nav>
  <!-- Reveal from left -->
		<nav id="revealLeft">
			<ul>
				<li>One</li>
				<li>Two</li>
				<li>Three</li>
				<li>Four</li>
				<li>Five</li>
			</ul>
		</nav>
  <!-- Zoom out reveal -->
		<nav id="zoomOut">
			<ul>
				<li>One</li>
				<li>Two</li>
				<li>Three</li>
				<li>Four</li>
				<li>Five</li>
			</ul>
		</nav>

		<div class="container">
			<div class="containerOverlay">
				<a href="#"></a>
			</div>

			<h1>Pure CSS Responsive Nav</h1>
			<a href="#pushLeft" class="button">Push in from left</a>
			<a href="#pushTop" class="button">Push in from top</a>
			<a href="#slideLeft" class="button">Slide over from left</a>
			<a href="#rotateTopLeft" class="button">Rotate in top to left</a>
			<a href="#flipIn" class="button">Flip in left</a>
      <a href="#revealLeft" class="button">Reveal from left</a>
      <a href="#zoomOut" class="button">Zoom out reveal</a>
		</div><!-- /.container -->
</body>
              
            
!

CSS

              
                * {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background: #4481AA;
	color: #fff;
	font: normal 300 16px/1.5 "Open Sans", sans-serif;
}
.container {
	position: fixed;
	z-index: 2;
  width: 100%;
	min-height: 100%;
	padding: 30px 50px;
	background: #4481AA;
	-webkit-transition: -webkit-transform 0.5s;
	-webkit-backface-visibility: hidden;
}
.containerOverlay {
	display:none;
	background: rgba(0,0,0,.3);
}
.containerOverlay,
.containerOverlay a {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}


/* Type and Buttons */
h1 {
	font-weight: 300;
}
.button {
	display: block;
	float: left;
	clear: left;
	margin-bottom: 16px;
	padding: 0 10px;
	background: #2A6791;
	color: #fff;
	border-bottom: 2px solid #154464;
	border-radius: 2px;
	text-decoration: none;
	line-height: 40px;
}


/* Nav */
nav {
	position: fixed;
	top: 0;
	bottom: 0;
	-webkit-transform: translate3d(-100%, 0, 0);
	-webkit-transition: -webkit-transform 0.5s;
	-webkit-backface-visibility: hidden;
	-webkit-perspective: 1000;

	width: 30%;
	background: #2A6791;
}
nav ul {
	margin: 0;
	padding: 0;
	list-style: none;;
}
nav li {
	display: block;
	padding: 10px 20px;
	border-bottom: 1px solid #225679;
}
nav:target {
	z-index: 3;
	-webkit-transform: translate3d(0, 0, 0);
}
nav:target ~ .container .containerOverlay {
	display: block;
}

/* Push left */
#pushLeft:target ~ .container {
	-webkit-transform: translate3d(30%, 0, 0);
}

/* Push top */
#pushTop {
	bottom: auto;
	width: 100%;
	height: 45px;
	-webkit-transform: translate3d(0, -100%, 0);
}
#pushTop li {
	float: left;
	padding: 0 16px;
	line-height: 45px;
	border: 0;
	border-right: 1px solid #225679;
}
#pushTop:target {
	-webkit-transform: translate3d(0, 0, 0);
}
#pushTop:target ~ .container {
	-webkit-transform: translate3d(0, 45px, 0);
}

/* Rotate in top to left */
#rotateTopLeft {
	z-index: 4;
	-webkit-transform: translate3d(0, 0, 0) rotate(90deg);
	-webkit-transform-origin: 0 0;
}
#rotateTopLeft:target {
	-webkit-transform: translate3d(0, 0, 0) rotate(0deg);
}

/* Flip in */
#flipIn {
	z-index: 4;
	-webkit-transform: translate3d(-100%, 0, 0);
	-webkit-perspective: 1200;
}
#flipIn:target .content {
  -webkit-transform: rotateY(-180deg);
}
#flipIn:target ~ .container {
	-webkit-transform: translate3d(30%, 0, 0);
}
#flipIn .content {
	position: relative;
	min-height: 100%;
	-webkit-transition: all .5s;
  -webkit-transform-style: preserve-3d;
  -webkit-transform-origin: 100% 50%;
}
.front, .back {
  position:absolute;
  top:0;
  bottom: 0;
  left:0;
  -webkit-backface-visibility:hidden;
}
.back {
	width: 100%;
	min-height: 100%;
	background: #2A6791;
  z-index:800;
  -webkit-transform:rotateY(-180deg);
}

/* Reveal from Left */
#revealLeft {
  z-index: 1;
  -webkit-transform: translate3d(0, 0, 0);
}
#revealLeft:target ~ .container {
  -webkit-transform: translate3d(30%, 0, 0);
}

/* Zoom out reveal */
#zoomOut {
  background: #4481AA;
  z-index: 1;
  -webkit-transform: translate3d(0,0,0);
}
#zoomOut:target ~ .container {
  -webkit-transform: scale(0.5) translate3d(200px, -100px, 0);
}
              
            
!

JS

              
                
              
            
!
999px

Console