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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <html>

<head>
  <meta charset="utf-8">
	  <link href="https://fonts.googleapis.com/css?family=Lato:100i,300i,400i" rel="stylesheet">
</head>

<body>
	  <div class="nav">
  <div class="nav1 bn"></div>
  <div class="nav2"></div>
  <div class="nav3"></div>
  <div class="nav4"></div>
  <div class="nav5"></div>
</div>
  <div class="clip cur1">
    <div class="head">
      <div class="content1"></div>
      <div class="content2"></div>
      <div class="content3"></div>
      <div class="content4"></div>
      <div class="content5"></div>
    </div>
  </div>
	<p class="scroll">Scroll</p>
 <div class="mousee">
  <svg version="1.1" id='mouse' class="mouse ab" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 210.414 210.414" style="enable-background:new 0 0 210.414 210.414;" xml:space="preserve">
  <g>
    <g>
      <g>
        <path id='roll1' d="M105.207,0C66.532,0,35.069,31.45,35.069,70.104v70.21c0,38.653,31.463,70.1,70.138,70.1
          c38.675,0,70.138-31.446,70.138-70.1v-70.21C175.345,31.45,143.881,0,105.207,0z M167.552,140.314
          c0,34.357-27.968,62.307-62.345,62.307c-34.377,0-62.345-27.95-62.345-62.307v-70.21c0-34.357,27.968-62.311,62.345-62.311
          c34.377,0,62.345,27.953,62.345,62.311V140.314z"/>
        <path id='roll2' d="M105.207,23.379c-2.152,0-3.897,1.743-3.897,3.897v35.286c0,2.154,1.745,3.897,3.897,3.897
          c2.152,0,3.897-1.743,3.897-3.897V27.276C109.103,25.122,107.359,23.379,105.207,23.379z"/>
      </g>
    </g>
  </g>
  </svg>
</div>
</body>

</html>

              
            
!

CSS

              
                *{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.clip{
  width:100%;
  height:100vh;
  position: fixed;
  z-index: 20;
  transition: all 1000ms cubic-bezier(0.19, 1, 0.22, 1);
}

.nav{
  position: fixed;
  z-index: 22;
  width: 100px;
  height: 100px;
  margin-left: 88vw;
  margin-top: 44vh;
  transition: .5s
}

.nav1{
  background-color: #bbb;
  width: 25px;
  height: 1px;
  margin-bottom: 10px;
  transition: .7s;

}

.nav2{
  background-color: #bbb;
  width: 25px;
  height: 1px;
  margin-bottom: 10px;
  transition: .7s;

}

.nav3{
  background-color: #bbb;
  width: 25px;
  height: 1px;
  margin-bottom: 10px;
  transition: .7s;

}

.nav4{
  background-color: #bbb;
  width: 25px;
  height: 1px;
  margin-bottom: 10px;
  transition: .7s;

}

.nav5{
  background-color: #bbb;
  width: 25px;
  height: 1px;
  margin-bottom: 10px;
  transition: .7s;

}

.bn{
  width: 50px;
}

.cur1{
  -webkit-clip-path: polygon(48% 42%, 70% 23%, 78% 48%, 63% 57%, 28% 70%, 27% 47%, 23% 23%);
clip-path: polygon(48% 42%, 70% 23%, 78% 48%, 63% 57%, 28% 70%, 27% 47%, 23% 23%);
}

.cur2{
  -webkit-clip-path: polygon(50% 39%, 77% 26%, 77% 56%, 67% 76%, 42% 71%, 19% 64%, 27% 20%);
clip-path: polygon(50% 39%, 77% 26%, 77% 56%, 67% 76%, 42% 71%, 19% 64%, 27% 20%);
}
.cur3{
  -webkit-clip-path: polygon(51% 21%, 74% 25%, 83% 51%, 45% 69%, 36% 49%, 21% 66%, 15% 33%);
clip-path: polygon(51% 21%, 74% 25%, 83% 51%, 45% 69%, 36% 49%, 21% 66%, 15% 33%);
}
.cur4{
  -webkit-clip-path: polygon(54% 31%, 78% 29%, 64% 55%, 49% 46%, 59% 67%, 30% 54%, 35% 29%);
clip-path: polygon(54% 31%, 78% 29%, 64% 55%, 49% 46%, 59% 67%, 30% 54%, 35% 29%);
}
.cur5{
  -webkit-clip-path: polygon(67% 30%, 77% 55%, 54% 46%, 47% 75%, 24% 30%, 44% 23%, 54% 11%);
clip-path: polygon(67% 30%, 77% 55%, 54% 46%, 47% 75%, 24% 30%, 44% 23%, 54% 11%);
}

.head{
  position: relative;
  width: 100%;
  height: 500vh;
  background-color: #fff;
  transition: .5s;
}


.content1{
  width: 100%;
  height:100vh;
  background-color: #4d1b7b;
  background-image: url('https://images.unsplash.com/photo-1467840227419-0f39bb2887ec?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=be3c3fcf59c8ede7013010db157fdfd3');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  transition: 1s;
}
.content2{
  width: 100%;
  height:100vh;
  background-color: #c79dd7	;
  background-image: url('https://images.unsplash.com/photo-1483829686443-863c1684ddad?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=caaf19829ab95f2d6c8f886291c2f63e');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  transition: 1s;
}
.content3{
  width: 100%;
  height:100vh;
  background-color: #ef4f91	;
  background-image: url('https://images.unsplash.com/photo-1497380297067-185ce1f97bf9?dpr=2&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb&crop=&bg=');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  transition: 1s;
}
.content4{
  width: 100%;
  height:100vh;
  background-color: #673888	;
  background-image: url('https://images.unsplash.com/photo-1493037875696-1f2eb8d732ed?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=f3291aab724c492dc5c9bc9cacd6336e');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  transition: 1s;
}
.content5{
  width: 100%;
  height:100vh;
  background-color: #363b74	;
  background-image: url('https://images.unsplash.com/photo-1464815564326-75eac871fb92?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1600&h=900&fit=crop&s=7eb5014ebfb9d0c781e2dc116a106b96');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  transition: 1s;
}

.down{
  height: 0%;
}

.mouse{
  margin-left: 47vw;
  margin-top: 85vh;
  width: 33px;
  height: 33px;
  position:fixed;
  z-index: 25;
  transition: .8s;
}

.mousee{
  transition: .7s;
  opacity: 1;
}

.scroll{
  position: fixed;
  margin-left: 47vw;
  margin-top: 91vh;
  font-family: 'Lato', sans-serif;
  font-weight: lighter;
  transition: .7s;
  opacity: 1;
  z-index: 25;
}

.hidemouse{
opacity: 0;
}

#roll1{
  stroke:#bbb;
  fill:#bbb;
}

#roll2{
  stroke:#bbb;
  fill:#bbb;
  animation: ani 2s linear infinite;
}

@keyframes ani {
  0%{
    transform: translateY(0px);
  }

  50%{
    transform: translateY(50px);
  }

  100%{
    transform: translateX(0px);
  }
}

              
            
!

JS

              
                var scrolling = false;
var curpage = 1;
var totpage = 5;
var time = 1000;
var down;
var prefix = '.content';
var prefix2='cur';
var prefix3='.nav'


function navigateUp() {
  if (curpage == 1) return;
  curpage--;
  if(curpage>1){
    $(".mousee").addClass('hidemouse');
    $(".scroll").addClass('hidemouse');
  }
  else {
    $(".mousee").removeClass('hidemouse');
    $(".scroll").removeClass('hidemouse');
  }
  down = false;
  move();
}

function navigateDown() {
  if (curpage == totpage) return;
  curpage++;
  if(curpage>1){
    $(".mousee").addClass('hidemouse');
    $(".scroll").addClass('hidemouse');

  }
  else {
    $(".mousee").removeClass('hidemouse');
    $(".scroll").removeClass('hidemouse');
  }
  down = true;
  move();
}

function move() {
  scrolling = true;
  if (down) {
    $(prefix + (curpage - 1)).addClass('down');
    for(var i=1;i<=5;i++){
      if(i==curpage){
        $(prefix3+i).addClass('bn');
      }
      else {
        $(prefix3+i).removeClass('bn');
      }
    }
    $('.clip').addClass(prefix2+curpage);
  } else {
    $(prefix + (curpage)).removeClass('down');
    var curpage2=curpage+1;
    for(var i=1;i<=5;i++){
      if(i==curpage){
        $(prefix3+i).addClass('bn');
      }
      else {
        $(prefix3+i).removeClass('bn');
      }
    }
    $('.clip').removeClass(prefix2+curpage2);
  }
  setTimeout(function() {
    scrolling = false;
  }, time);
}

$(document).on("mousewheel DOMMouseScroll", function(e) {
   if (scrolling) return;
   if (e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0) {
     navigateUp();
   } else {
     navigateDown();
   }
 });


$(document).on("keydown", function(e) {
  console.log('working');
  if (scrolling)
    return;
  if (e.which === 38) {
    navigateUp();
  } else if (e.which === 40) {
    navigateDown();
  }
});



              
            
!
999px

Console