cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

            
              	<nav id="dot">
	<ul>
		<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>
	</ul>
</nav>

<section id="contents">
	<div id="section1">
		<div class="container">
			<div class="sec1">
				<h2 class="animate one">
					<span>J</span><span>u</span><span>s</span><span>t</span>&nbsp;<span>O</span><span>n</span><span>c</span><span>e</span>
				</h2>
			</div>
		</div>
	</div>
	<div id="section2">
		<div class="container">
			<div class="sec2">
				<h2 class="animate">
					<span>W</span><span>i</span><span>t</span><span>h</span><span>o</span><span>u</span><span>t</span>&nbsp;<span>m</span><span>e</span>
				</h2>
			</div>
		</div>
	</div>
	<div id="section3">
		<div class="container">
			<div class="sec3">
				<h2 class="animate">
					<span>H</span><span>o</span><span>w</span>&nbsp;<span>a</span><span>m</span>&nbsp;<span>i</span>&nbsp;<span>s</span><span>u</span><span>p</span><span>p</span><span>o</span><span>s</span><span>e</span>&nbsp;<span>t</span><span>o</span>&nbsp;<span>l</span><span>i</span><span>v</span><span>e</span>&nbsp;<span>w</span><span>i</span><span>t</span><span>h</span><span>o</span><span>u</span><span>t</span>&nbsp;<span>y</span><span>o</span><span>u</span>
				</h2>
			</div>
		</div>
	</div>
	<div id="section4">
		<div class="container">
			<div class="sec4">
				<h2 class="animate">
					<span>W</span><span>h</span><span>a</span><span>t</span><span>e</span><span>v</span><span>e</span><span>r</span>&nbsp;<span>y</span><span>o</span><span>u</span>&nbsp;<span>d</span><span>o</span>
				</h2>
			</div>
		</div>
	</div>
	<div id="section5">
		<div class="container">
			<div class="sec5">
				<h2 class="animate">
					<span>C</span><span>r</span><span>u</span><span>s</span><span>h</span>&nbsp;<span>o</span><span>n</span>&nbsp;<span>y</span><span>o</span><span>u</span>
				</h2>
			</div>
		</div>
	</div>
	<div id="section6">
		<div class="container">
			<div class="sec6">
				<h2 class="animate">
					<span>D</span><span>o</span><span>n</span><span>'</span><span>t</span>&nbsp;<span>l</span><span>o</span><span>o</span><span>k</span>&nbsp;<span>b</span><span>a</span><span>c</span><span>k</span>&nbsp;<span>i</span><span>n</span>&nbsp;<span>a</span><span>n</span><span>g</span><span>e</span><span>r</span>
				</h2>
			</div>
		</div>
	</div>
</section>
            
          
!
            
              @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; 
	color:#fff; 
	text-align: center;
}
#contents > div {
	height: 100vh; line-height: 100vh;
	position: relative;
}
/* section */
#section1 {background-image: linear-gradient(to right, #eea2a2 0%, #bbc1bf 19%, #57c6e1 42%, #b49fda 79%, #7ac5d8 100%);}
#section2 {background-image: linear-gradient(to top, #0ba360 0%, #3cba92 100%);}
#section3 {background-image: linear-gradient(to top, #fcc5e4 0%, #fda34b 15%, #ff7882 35%, #c8699e 52%, #7046aa 71%, #0c1db8 87%, #020f75 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%);}

.animate span {opacity: 0; display: inline-block;}
.sec1 .animate span.show {animation: ani1 .35s ease forwards;}
.sec2 .animate span.show {
	animation: ani2 .4s forwards; 
	transform: translate(-150px, -50px) rotate(-180deg) scale(3);
}
.sec3 .animate span.show {
	animation: ani3 .3s forwards;
	transform: translate(200px, -100px) scale(2);
}
.sec4 .animate span.show {
	animation: ani4 .5s forwards;
	transform: translate(-300px, 0) scale(0);
}
.sec5 .animate span.show {
	animation: ani5 .8s forwards;
	transform: translate(0, -100px) rotate(360deg) scale(0);
}
.sec6 .animate span.show {
	animation: ani6 .5s forwards;
	transform: translate(0, -100px) rotate(360deg) scale(0);
}

.animate span {opacity: 0;}
#section1.show .animate span {animation: ani1 .35s ease forwards;}
#section2.show .animate span {animation: ani2 .35s ease forwards;}
#section3.show .animate span {animation: ani3 .35s ease forwards;}
#section4.show .animate span {animation: ani4 .35s ease forwards;}
#section5.show .animate span {animation: ani5 .35s ease forwards;}
#section6.show .animate span {animation: ani6 .35s ease forwards;}


@keyframes ani1 {
	0% {opacity: 0}
	100% {opacity: 1;}
}



@keyframes ani2 {
	60% {transform: translate(20px, 20px) rotate(30deg) scale(.3);}
	100% {transform: translate(0) rotate(0) scale(1); opacity: 1;}
}
@keyframes ani3 {
	60% {transform: translate(0, 20px) rotate(-180deg) scale(.5);}
	100% {transform: translate(0) rotate(0deg) scale(1); opacity: 1;}
}
@keyframes ani4 {
	60% {transform: translate(20px, 0) scale(1); color: #b10e81;}
	80% {transform: translate(20px, 0) scale(1); color: #b10e81;}
	99% {transform: translate(0) scale(1.2); color: #00f0ff;}
	100% {transform: translate(0) scale(1); color: #fff; opacity: 1;}
}
@keyframes ani5 {
	30% {transform: translate(0, -50px) rotate(180deg) scale(1);}
	60% {transform: translate(0, 20px) scale(.8) rotate(0deg);}
	100% {transform: translate(0) scale(1) rotate(0deg); opacity: 1;}
}
@keyframes ani6 {
	30% {transform: translate(0, -50px) rotate(180deg) scale(1);}
	50% {transform: translate(0, 20px) scale(.8) rotate(0deg); opacity: 1;}
	80% {transform: translate(-100px, -100px) scale(1.5) rotate(-180deg); opacity: 0;}
	100% {transform: translate(0) scale(1) rotate(0deg); opacity: 1;}
}
            
          
!
            
              var dot = $("#dot ul li");
var contents = $("#contents > div");

dot.click(function(e){
	e.preventDefault();
	var target = $(this);
	var index = target.index();
	var section = contents.eq(index);
	var offset = section.offset().top;
	$("html,body").animate({scrollTop:offset},600,"easeInOutExpo");
});

$(window).scroll(function(){
	var wScroll = $(this).scrollTop();

	if(wScroll >= contents.eq(0).offset().top){
		dot.removeClass("active");
		dot.eq(0).addClass("active");
	}
	if(wScroll >= contents.eq(1).offset().top){
		dot.removeClass("active");
		dot.eq(1).addClass("active");
	}
	if(wScroll >= contents.eq(2).offset().top){
		dot.removeClass("active");
		dot.eq(2).addClass("active");
	}
	if(wScroll >= contents.eq(3).offset().top){
		dot.removeClass("active");
		dot.eq(3).addClass("active");
	}
	if(wScroll >= contents.eq(4).offset().top){
		dot.removeClass("active");
		dot.eq(4).addClass("active");
	}
	if(wScroll >= contents.eq(5).offset().top){
		dot.removeClass("active");
		dot.eq(5).addClass("active");
	}
	
	if(wScroll >= contents.eq(0).offset().top - $(window).height()/3){
		$(".sec1 h2 span").each(function(i){
			setTimeout(function(){
				$(".sec1 h2 span").eq(i).addClass("show");
			},100*(i+1));
		});
	}	
	
	if(wScroll >= contents.eq(1).offset().top - $(window).height()/3){
		$(".sec2 h2 span").each(function(i){
			setTimeout(function(){
				$(".sec2 h2 span").eq(i).addClass("show");
			},100*(i+1));
		});
	}	
	
	if(wScroll >= contents.eq(2).offset().top - $(window).height()/3){
		$(".sec3 h2 span").each(function(i){
			setTimeout(function(){
				$(".sec3 h2 span").eq(i).addClass("show");
			},100*(i+1));
		});
	}	
	
	if(wScroll >= contents.eq(3).offset().top - $(window).height()/3){
		$(".sec4 h2 span").each(function(i){
			setTimeout(function(){
				$(".sec4 h2 span").eq(i).addClass("show");
			},100*(i+1));
		});
	}	
	
	if(wScroll >= contents.eq(4).offset().top - $(window).height()/3){
		$(".sec5 h2 span").each(function(i){
			setTimeout(function(){
				$(".sec5 h2 span").eq(i).addClass("show");
			},100*(i+1));
		});
	}	
	
	if(wScroll >= contents.eq(5).offset().top - $(window).height()/3){
		$(".sec6 h2 span").each(function(i){
			setTimeout(function(){
				$(".sec6 h2 span").eq(i).addClass("show");
			},100*(i+1));
		});
	}	

});
            
          
!
999px
🕑 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 ..................

Console