css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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="dot">
		<li class="active"><a href="#c"></a></li>
		<li><a href="#c"></a></li>
		<li><a href="#c"></a></li>
		<li><a href="#c"></a></li>
		<li><a href="#c"></a></li>
		<li><a href="#c"></a></li>

<section id="contents">
	<div id="section1">
		<div class="container">
			<div class="sec1">
				<h2>Just Once</h2>
	<div id="section2">
		<div class="container">
			<div class="sec2">
				<h2>Without me</h2>
	<div id="section3">
		<div class="container">
			<div class="sec3">
				<h2>How am i suppose to live without you</h2>
	<div id="section4">
		<div class="container">
			<div class="sec4">
				<h2>Whatever you do</h2>
	<div id="section5">
		<div class="container">
			<div class="sec5">
				<h2>Crush on you</h2>
	<div id="section6">
		<div class="container">
			<div class="sec6">
				<h2>Don't look back in anger</h2>
              @import url('https://fonts.googleapis.com/css?family=Electrolize');
/* reset */
*{margin:0; padding:0}
li,ul {list-style:none}
a {text-decoration:none}
body {font-family: 'Electrolize', sans-serif;}

/* nav */
#dot {position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index:1000;}
#dot li {}
#dot li a {position: relative; width: 15px; height: 15px; background-color: rgba(255,255,255,0.5); border-radius: 15px; margin: 8px; display: block;}
#dot li.active a {position: relative; background-color: rgba(255,255,255,1);}

/* dot style */
#dot li a {
	background-color: transparent;
	box-shadow: inset 0 0 0 2px white;
	-webkit-transition: background 0.3s ease;
	transition: background 0.3s ease;

#dot li a::after {
	content: '';
	position: absolute;
	bottom: 0;
	height: 0;
	left: 0;
	width: 100%;
	background-color: #fff;
	box-shadow: 0 0 1px #fff;
	-webkit-transition: height 0.3s ease;
	transition: height 0.3s ease;

#dot li a:hover {
	background-color: rgba(255,255,255,0.4);

#dot li.current a::after {
	height: 100%;

/* contents */
#contents {
	font-size: 60px; 
	text-align: center;
#contents > div {
	height: 100vh; line-height: 100vh;
	position: relative;
/* section */
#section1 {background-image: linear-gradient(to right, #ff8177 0%, #ff867a 0%, #ff8c7f 21%, #f99185 52%, #cf556c 78%, #b12a5b 100%);}
#section2 {background-image: linear-gradient(to top, #fbc2eb 0%, #a6c1ee 100%);}
#section3 {background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);}
#section4 {background-image: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);}
#section5 {background-image: linear-gradient(to top, #96fbc4 0%, #f9f586 100%);}
#section6 {background-image: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);}

#contents #section1 h2 {opacity:0; transition: all 0.75s ease-in-out; transform: translate3d(0,0,0)}
#contents #section2 h2 {opacity:0; transition: all 0.75s ease-in-out; transform: translate3d(0,-10%,0)}
#contents #section3 h2 {opacity:0; transition: all 0.75s ease-in-out; transform: translate3d(-10%,0,0)}
#contents #section4 h2 {opacity:0; transition: all 0.75s ease-in-out; transform: translate3d(10%,0,0)}
#contents #section5 h2 {opacity:0; transition: all 0.75s ease-in-out; transform: translate3d(0,10%,0)}
#contents #section6 h2 {opacity:0; transition: all 0.75s ease-in-out; transform: skew(90deg)}

#contents #section1.show h2 {opacity:1; transform: none;}
#contents #section2.show h2 {opacity:1; transform: none;}
#contents #section3.show h2 {opacity:1; transform: none;}
#contents #section4.show h2 {opacity:1; transform: none;}
#contents #section5.show h2 {opacity:1; transform: none;}
#contents #section6.show h2 {opacity:1; transform: none;}
              var nav = $("#dot ul li");
var contents = $("#contents > div");

	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){
	if(wScroll >= contents.eq(0).offset().top - $(window).height()/3){
	if(wScroll >= contents.eq(1).offset().top - $(window).height()/3){
	if(wScroll >= contents.eq(2).offset().top - $(window).height()/3){
	if(wScroll >= contents.eq(3).offset().top - $(window).height()/3){
	if(wScroll >= contents.eq(4).offset().top - $(window).height()/3){
	if(wScroll >= contents.eq(5).offset().top - $(window).height()/3){
🕑 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 ..................