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.

            
              <section id="home">
	<div>
		<h1>#dailyui</h1>
		<h2>100 challenges in 100 days</h2>
	</div>
</section>

<section ontouchstart id="one">
	<p data-height="300" data-theme-id="26806" data-slug-hash="vgOPPm" data-default-tab="result" data-user="gabriellewee" data-embed-version="2" data-pen-title="#dailyui 001: Sign Up" class="codepen">See the Pen <a href="https://codepen.io/gabriellewee/pen/vgOPPm/">#dailyui 001: Sign Up</a> by Gabrielle Wee (<a href="https://codepen.io/gabriellewee">@gabriellewee</a>) on <a href="https://codepen.io">CodePen</a>.</p>
	<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
	<div class="overlay">
		<div>
			<h1>#one</h1>
			<h2>signup</h2>
		</div>
	</div>
</section>

<section ontouchstart id="two">
	<p data-height="300" data-theme-id="26806" data-slug-hash="OWydWe" data-default-tab="result" data-user="gabriellewee" data-embed-version="2" data-pen-title="#dailyui 002: Checkout" class="codepen">See the Pen <a href="https://codepen.io/gabriellewee/pen/OWydWe/">#dailyui 002: Checkout</a> by Gabrielle Wee (<a href="https://codepen.io/gabriellewee">@gabriellewee</a>) on <a href="https://codepen.io">CodePen</a>.</p>
	<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>
	<div class="overlay">
		<div>
			<h1>#two</h1>
			<h2>checkout</h2>
		</div>
	</div>
</section>

<section id="upcoming">
	<div>
		<h1>#upcoming</h1>
		<ul>
			<li>
				<div>
					<span>004</span>
					<span>calculator</span>
				</div>
			</li>
			<li>
				<div>
					<span>005</span>
					<span>app icon</span>
				</div>
			</li>
			<li>
				<div>
					<span>006</span>
					<span>user profile</span>
				</div>
			</li>
			<li>
				<div>
					<span>and more</span>
				</div>
			</li>
		</ul>
	</div>
</section>

<header ontouchstart>
	<ul>
		<li><a class="active" data-scroll href="#home">#home</a></li>
		<li><a data-scroll href="#one">#one</a></li>
		<li><a data-scroll href="#two">#two</a></li>
		<li><a data-scroll href="#upcoming">#upcoming</a></li>
	</ul>
</header>
            
          
!
            
              $gunmetal: #021112;
$livid: #2E2929;
$iron: #D3D4D9;
$oxblood: #76323f;
$blackboard: #565656;

$font: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
$padding: 12px;

* { box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0); }
*:focus { outline: none!important; }
body {
	margin: 0;
	padding: 0;
	font-family: $font;
	background: white;
	color: $gunmetal;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

header {
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	display: flex;
	align-items: flex-end;
	align-content: flex-end;
	backface-visibility: hidden;
	ul {
		padding: $padding/2;
		li {
			padding: $padding/2;
		}
	}
	a {
		display: inline-block;
		cursor: pointer;
		border-radius: 2px;
		background: rgba(white, .75);
		padding: $padding;
		box-shadow: 0 0 10px rgba($gunmetal, .1);
		color: $gunmetal;
		text-decoration: none;
		&.active {
			background: $gunmetal;
			color: white;
		}
		&:hover, &:focus {
			background: $oxblood;
			color: white;
		}
		&:active {
			background: $blackboard;
		}
	}
}

section {
	position: relative;
	width: 100vw;
	height: 100vh;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	h1, h2 {
		color: white;
		text-align: center;
		padding: 0 $padding;
	}
	h1 {
		font-size: 64px;
	}
	h2 {
		font-size: 18px;
		text-transform: uppercase;
		font-weight: 700;
		letter-spacing: 2px;
		line-height: 1.2;
	}
	.overlay {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		cursor: pointer;
		&.hide {
			opacity: 0;
			z-index: -100;
			transition: opacity 500ms ease-out, z-index 10ms linear 500ms;
		}
	}
	&#home, &#upcoming, .overlay {
		display: flex;
		align-items: center;
		align-content: center;
		justify-content: center;
	}
	&#home {
		display: flex;
		align-items: center;
		align-content: center;
		justify-content: center;
		background-image: url('https://images.unsplash.com/photo-1457612928689-a1ab27da0dad?dpr=2&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb');
		h1, h2 {
			text-shadow: 0 0 10px rgba($gunmetal, .25);
		}
	}
	&#one {
		.overlay {
			background: rgba($blackboard, .95);
			&:hover, &:focus {
				background: $blackboard;
			}
			&:active {
				background: rgba($blackboard, .25);
			}
		}
	}
	&#two {
		.overlay {
			background: rgba($livid, .95);
			&:hover, &:focus {
				background: $livid;
			}
			&:active {
				background: rgba($livid, .25);
			}
		}
	}
	&#upcoming {
		background: darken($oxblood, 15%);
		ul {
			display: flex;
			justify-content: center;
			flex-flow: row wrap;
			padding: $padding/2;
			max-width: 800px;
			li {
				padding: $padding/2;
				div {
					display: flex;
					border-radius: 2px;
					overflow: hidden;
					span {
						display: block;
						padding: $padding;
						&:first-child {
							background: rgba(white, .8);
							color: $oxblood;
						}
						&:last-child {
							background: $oxblood;
							color: white;
						}
					}
				}
			}
		}
	}
}

@media only screen and (min-width: 768px) {
	section {
		h1 {
			font-size: 96px;
		}
		h2 {
			font-size: 24px;
		}
	}
}
            
          
!
            
              var windowHeight = window.innerHeight;
$('section, header').css('max-height', windowHeight);

function maximizeEmbed() {
	var pageHeight = $("#home").height();
	$('.codepen').attr('data-height', pageHeight);
};
maximizeEmbed();
$(window).on('resize', function () {
	maximizeEmbed();
});

$(".overlay").click(function(){
	$(this).addClass("hide");
	setTimeout(function() {
		$(this).hide();
	}, 500);
});;

var section = $('section'),
	 nav = $('header');
$(window).on('scroll', function () {
	var cur_pos = $(this).scrollTop();
	section.each(function() {
		var top = $(this).offset().top,
			 bottom = top + $(this).outerHeight();
		if (cur_pos >= top && cur_pos <= bottom) {
			nav.find('a').removeClass('active');
			section.removeClass('active');
			$(this).addClass('active');
			nav.find('a[href="#'+$(this).attr('id')+'"]').addClass('active');
		}
	});
});

smoothScroll.init();
            
          
!
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