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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <nav class="section__nav">
	<ul class="section__nav-list">
		<li class="section__nav-item">
			<a href="" class="section__nav-link"><svg x="0" y="0" width="200" height="200" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve"><path d="M199 99.5c0 55-44.5 99.5-99.5 99.5 -55 0-99.5-44.5-99.5-99.5C0 44.5 44.5 0 99.5 0 154.5 0 199 44.5 199 99.5z"/></svg>
			</a>
		</li>
		<li class="section__nav-item">
			<a href="" class="section__nav-link">
				<svg x="0" y="0" width="200" height="200" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve"><polygon points="0 187 100 13.8 200 187 "/></svg>
			</a>
		</li>
		<li class="section__nav-item">
			<a href="" class="section__nav-link">
				
				<svg x="0" y="0" width="200" height="200" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve"><rect width="200" height="200"/></svg>
			</a>
		</li>
		<li class="section__nav-item">
			<a href="" class="section__nav-link">
				<svg x="0" y="0" width="200" height="200" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve"><polygon points="38 194 0 77.8 99.6 5.9 199.1 77.6 161.1 194 "/></svg>

			</a>
		</li>
	</ul>
</nav>
<section class="section">
	<div class="section__wrapper">
		<h1 class="section__title">Circle</h1>
		<p>A circle is a simple shape in Euclidean geometry. It is the set of all points in a plane that are at a given distance from a given point.</p>
	</div>
</section>
<section class="section">
	<div class="section__wrapper">
		<h1 class="section__title">Triangle</h1>
		<p>A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry.</p>
	</div>
</section>
<section class="section">
	<div class="section__wrapper">
		<h1 class="section__title">Square</h1>
		<p>In geometry, a square is a regular quadrilateral, which means that it has four equal sides and four equal angles (90-degree angles, or right angles).</p>
	</div>
</section>
<section class="section">
	<div class="section__wrapper">
		<h1 class="section__title">Pentagon</h1>
		<p>In geometry, a pentagon is any five-sided polygon. A pentagon may be simple or self-intersecting.</p>
	</div>
</section>
<section class="section">
	<div class="section__wrapper">
		<h1 class="section__title">Space</h1>
		<p>Space is the boundless three-dimensional extent in which objects and events have relative position and direction.</p>
	</div>
</section>
<!-- Ettrics -->
<a href="http://ettrics.com/blog/" class="logo" target="_blank">
 <img class="logo" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/45226/ettrics-logo.svg" alt="" /> 
</a>
              
            
!

CSS

              
                align()
	display flex
	align-items center
	justify-content center
easeout(s=.5s)
	transition all s cubic-bezier(0.23, 1, 0.32, 1)

*
	box-sizing: border-box
	
body
	line-height: 1.5
	overflow hidden
	background #2694f1
	font-family Roboto
	-webkit-font-smoothing antialiased
	
ul
	list-style-type: none
	margin: 0
	padding: 0
	
.section
	will-change transform
	height: 100vh
	align()
	easeout(.7s)
	
	&:last-of-type
		background #333
	
	@media (max-width 720px)
		align-items flex-end
	
	&__wrapper
		padding: 0 4vw
		margin-left 50%
		
		@media (max-width 720px)
			margin-left 20vw
			margin-bottom 50px
			
		@media (max-width 500px)
			margin-left 30vw
			
	&__nav
		position fixed
		z-index 3
		top 0
		left 0
		height 100vh
		align()
		
		@media (max-width 720px)
			width 20vw
			background: rgba(black, 0.2);
		
		@media (max-width 500px)
			width 25vw
			
	&__nav-item
		margin: 10px 0
		
		.section__nav-link.active
				> svg
					opacity 1
					stroke-width 20px
					stroke rgba(white, 0.3)
					
		&:nth-child(1)
			.section__nav-link.active
				> svg
					transform scale(4) translate(6.2vw, 40px)
				
		&:nth-child(2)
			.section__nav-link.active
				> svg
					transform scale(4) translate(6.2vw, 15px)
					
		&:nth-child(3)
			.section__nav-link.active
				> svg
					transform scale(4) translate(6.2vw, -10px)
					
		&:nth-child(4)
			.section__nav-link.active
				> svg
					transform scale(4) translate(6.2vw, -30px)
		
		@media (max-width 720px)
			&:nth-child(1)
				.section__nav-link.active
					> svg
						transform scale(3.5) translate(55px, 20px)
						
			&:nth-child(2)
				.section__nav-link.active
					> svg
						transform scale(3.5) translate(60px, -5px)
						
			&:nth-child(3)
				.section__nav-link.active
					> svg
						transform scale(4) translate(60px, -25px)
						
			&:nth-child(4)
				.section__nav-link.active
					> svg
						transform scale(4) translate(50px, -55px)
						
		@media (max-width: 500px)
			&:nth-child(1)
				.section__nav-link.active
					> svg
						transform scale(3) translate(48px, 3.5vh)

			&:nth-child(2)
				.section__nav-link.active
					> svg
						transform scale(3) translate(50px, -0.7vh)

			&:nth-child(3)
				.section__nav-link.active
					> svg
						transform scale(3) translate(50px, -2.5vh)

			&:nth-child(4)
				.section__nav-link.active
					> svg
						transform scale(3) translate(48px, -8.5vh)
					
	&__nav-link
		display block
		transform none
		
		svg
			will-change transform, opacity, stroke
			width 70px
			height 70px
			margin 0 4vw
			fill #00ffcf
			opacity 0.5
			padding 10px
			easeout()
			
			@media (max-width 500px)
				width 55px
				height 55px
			
	&__title
		color #00ffcf
		font-weight 300
		margin 0 0 25px 0
		
		@media (max-width 720px)
			margin 0 0 13.5px 0
		
	p
		font-size 20px
		margin 0
		color rgba(black, 0.8)
		max-width 640px
		
		@media (max-width 720px)
			font-size 16px
		
.logo
	position: fixed
	bottom: 3vh
	right: 3vw
	z-index: 4
  
  img
		width: 45px
              
            
!

JS

              
                var Shapes = (function() {
	
	var link = $('.section__nav-link');
	var section = $('.section');
	var svg = $('.section__nav-link > svg');
	
	var toggleSection = function() {
		var i = $(this).parents('li').index();

		link.removeClass('active')
		svg.removeAttr('style');
		$(this).addClass('active');
		
		section.css({
			'transform': 'translateY(-' + i +'00%)',
			'-webkit-transform': 'translateY(-' + i +'00%)'
		});
		
		return false;
	};
	
	var toggleSpace = function() {
	
		if ($(this).parent().hasClass('active')) {
			link.removeClass('active');
			section.css('opacity', 0);
			
			section.on('transitionend', function() {
				section.css({
					'transform': 'translateY(-400%)',
					'-webkit-transform': 'translateY(-400%)',
				});
				section.on('transitionend', function() {
					section.css('opacity', '1');
					section.off('transitionend');
				});
			});
	
			return false;
		}
	};
	
	var showFirst = function() {
		link.eq(0).addClass('active');		
	};
	
	var bindActions = function() {
		link.on('click', toggleSection);
		svg.on('click', toggleSpace);
		showFirst();
	};
	
	var init = function() {
		bindActions();
	};
	
	return {
		init: init
	};
	
}());

Shapes.init();
              
            
!
999px

Console