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.

              <link href="https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i'" rel="stylesheet">

<nav id="nav">
  <div class="trigger">
    <div class="bar-wrap">
      <a href="#">
        <span class="bar bar1"></span>
        <span class="bar bar2"></span>
        <span class="bar bar3"></span>
  <ul class="clearfix">
    <li class="on"><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> 

<div id="contents">
  <div id="section1">
    <div class="container">
      <div class="sec1">
        <h2>Seeing is believing</h2>
  <div id="section2">
    <div class="container">
      <div class="sec2">
        <h2>Time is gold</h2>
  <div id="section3">
    <div class="container">
      <div class="sec3">
        <h2>Asking costs nothing</h2>
  <div id="section4">
    <div class="container">
      <div class="sec4">
        <h2>Better is to bow than break</h2>
  <div id="section5">
    <div class="container">
      <div class="sec5">
        <h2>Habit is second nature</h2>
  <div id="section6">
    <div class="container">
      <div class="sec6">
        <h2>Pain past is pleasure</h2>
              * {padding: 0; margin: 0}
li {list-style: none;}
a {text-decoration: none;}
.clearfix:bofore, clearfix:after {display:block; content:''; line-height:0;}
.clearfix:after {clear:both;}

/* contents */
#contents {text-align: center; font-family: 'UnifrakturCook', cursive; color: #fff; font-size: 40px;}
#contents > div {height: 100vh; line-height: 100vh;}

/* nav */
#nav {position: absolute; left: 0; bottom: -56px; width: 100%; background-color: rgba(0,0,0,0.5);}
#nav.on {position:fixed; top:0;}
#nav ul { }
#nav ul li {float: left; width: 16.66666%;  font-size: 16px; text-align: center;}
#nav ul li a {color: #fff; padding: 20px; display: block; }
#nav ul li.on a {background-color: rgba(0,0,0,0.3);}

/* section */
#section1 {background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);}
#section2 {background-image: linear-gradient(45deg, #243949 0%, #517fa4 100%);}
#section3 {background-image: linear-gradient(45deg, #1e3c72 0%, #1e3c72 1%, #2a5298 100%);}
#section4 {background-image: linear-gradient(45deg, #874da2 0%, #c43a30 100%);}
#section5 {background-image: linear-gradient(-20deg, #2b5876 0%, #4e4376 100%);}
#section6 {background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);}

/* trigger */
.trigger {display: none;}
.trigger h1 {padding: 12px 10px 10px 10px; color:#fff; letter-spacing:-1px; font-size:22px;}
.bar-wrap {position:absolute; right:5px; top:5px;}
.bar-wrap a {display:block; width:40px; height:40px;}
.bar-wrap a .bar {position:absolute; left:5px; width:31px; height:3px; background:#fff;}
.bar-wrap a .bar.bar1 {top:10px;}
.bar-wrap a .bar.bar2 {top:18px;}
.bar-wrap a .bar.bar3 {top:26px;}

/* mediaquery */
	#nav ul li {width: 33.3333%; }

  .trigger {display: block;}
  #nav ul {display: none;}
  #nav ul li {width:100%; }
              // 메뉴 fixed
	var header = $(this);
	var headerOffset = header.offset().top;
		var wScroll = $(window).scrollTop();
		if(wScroll > headerOffset){
		} else {

//bar-wrap을 클랙했을 때
	$("#nav ul").slideToggle();

//모바일모드에서 pc모드로 갈때 nav사라지는 버그 고치기
var menu = $("#nav ul");
	var wWidth = $(window).width();
	if(wWidth > 400 && menu.is(":hidden")){

var nav = $("#nav > ul > li");
var contents = $("#contents > div");
var menu = $("#nav ul");

    e.preventDefault();         //브라우저에 # 기본 기능 차단
    var target = $(this);
    var index = target.index();
    var section = contents.eq(index);
    var offset = section.offset().top;
    $("html, body").animate({scrollTop:offset},300,"easeInQuint");

        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.