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.

              <nav id="side-nav">
	<h1>Side Menu Bar</h1>
		<li class="active"><a href="#section1">Intro</a></li>
		<li><a href="#section2">Skill</a></li>
		<li><a href="#section3">Coding</a></li>
		<li><a href="#section4">Design</a></li>
		<li><a href="#section5">About</a></li>
		<li><a href="#section6">Contact</a></li>
	<a href="#" class="navBtn">Open</a>

<section id="contents">
	<div id="section1">
		<div class="container">
			<div class="sec1">
				<h2>난 <strong>바스켓맨</strong> 이니까.</h2>
	<div id="section2">
		<div class="container">
			<div class="sec2">
				<h2>사나이는 <strong>사나이답게</strong> 마무리 짓는다.</h2>
	<div id="section3">
		<div class="container">
			<div class="sec3">
				<h2>그래 난 정대만. <strong>포기를 모르는 남자</strong>지.</h2>
	<div id="section4">
		<div class="container">
			<div class="sec4">
				<h2>용서해야 <strong>남자</strong>다.</h2>
	<div id="section5">
		<div class="container">
			<div class="sec5">
				<h2>마음 이외에는 모두 <strong>너의 것</strong>.</h2>
	<div id="section6">
		<div class="container">
			<div class="sec6">
				<h2>포기하면 그 순간이 바로 <strong>시합 종료</strong>다.</h2>
              @import url('https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900');
/* font-family: 'Lato', sans-serif; */

/* nav */
#side-nav {position: fixed; left: -300px; top: 0; width: 300px; height: 100vh; background: rgba(255,255,255,0.5); font-family: 'Lato', sans-serif; transition: left 0.3s cubic-bezier(0.6,-0.01, 0.13, 0.72);}
#side-nav h1 {padding: 60px 20px 40px 20px; color: #fff; font-size: 30px; text-align: center; font-weight: 700;}
#side-nav li {border-left: 5px solid transparent;}
#side-nav li a {color: #fff; text-decoration: none; padding: 14px 20px; display: block; text-transform: uppercase; text-shadow: 0px 1px 1px rgba(0,0,0,0.3);}
#side-nav li.active {background: rgba(255,255,255,0.2); border-left: 5px solid #fff;}

#side-nav .navBtn {position: absolute; right: -60px; top: 10px; display: block; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.4); text-align: center; line-height: 50px; color: #fff; font-size: 14px; text-decoration: none; transition: all 0.3s ease;}
#side-nav .navBtn:hover {background: rgba(255,255,255,0.7);}

#side-nav.open {left: 0px;}

/* container */
.container {}

/* contents */
#contents {font-size: 80px; color: #fff; text-align: center; font-family: 'Lato', sans-serif;}
#contents > div {height: 100vh; line-height: 100vh;}
#contents h2 {font-weight: 100;}
#contents h2 strong {font-weight: 700;}

/* section */
#section1 {background: radial-gradient(ellipse farthest-corner at center top, #ddd6f3 0%, #c71d6f 100%);}
#section2 {background: radial-gradient(ellipse farthest-corner at left top, #16a085 0%, #f4d03f 100%);}
#section3 {background: radial-gradient(ellipse farthest-corner at right top, #c2e59c 0%, #00cdac 100%);}
#section4 {background: radial-gradient(ellipse farthest-corner at left center, #ffdde1 0%, #f33b4e 100%);}
#section5 {background: radial-gradient(ellipse farthest-corner at bottom left, #bdc2e8 0%, #2a5298 100%);}
#section6 {background: radial-gradient(ellipse farthest-corner at bottom center, #b3ffab 0%, #fc00ff 100%);}
              var nav = $("#side-nav ul li");
var contents = $("#contents > div");
var sideBar = $("#side-nav");

	e.preventDefault();		//클릭 시 # 링크 최상위 이동 차단
	// $("#side-nav").css("left","0px");
	// $("#side-nav").addClass("open");
		sideBar.animate({"left":"0px"},200, "easeInOutCirc");
	} else {
		sideBar.animate({"left":"-300px"},200, "easeInOutCirc");

	var target = $(this);
	var index = target.index();
	// alert(index);
	var section = contents.eq(index);
	var offset = section.offset().top;
	// alert(offset);
	$("html,body").animate({scrollTop:offset},600, "easeInOutExpo");

	var wScroll = $(this).scrollTop();
	if(wScroll >= contents.eq(0).offset().top){
	if(wScroll >= contents.eq(1).offset().top){
	if(wScroll >= contents.eq(2).offset().top){
	if(wScroll >= contents.eq(3).offset().top){
	if(wScroll >= contents.eq(4).offset().top){
	if(wScroll >= contents.eq(5).offset().top){
🕑 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.