Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <div id="slider">

	<section class="slide" style="background-color:#e94437;">
		<div>
			<div class="vis" style="background-image:url();"></div>
			<h1>...</h1>
			<p><strong>...</strong></p>
			<p><b>...</b></p>
		</div>
	</section>
	
	<section class="slide" style="background-color:#b0a696;">
		<div>
			<div class="vis" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/710995/masques-theatre.png);"></div>
			<h1>Lorem Ipsum bla bla</h1>
			<p>Client : <strong>Agence d-iD-o!</strong></p>
			<p>Type de réalisation : <b>Site internet</b></p>
			<a href="http://www.google.fr">xxxxxxx</a>
		</div>
	</section>
	
	<section class="slide" style="background-color:#748d8d;">
		<div>
			<div class="vis" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/710995/ballons.png);"></div>
			<h1>Lorem Ipsum bla bla</h1>
			<p>Client : <strong>31 Emotions</strong></p>
			<p>Type de réalisation : <b>Site internet</b></p>
			<a href="http://www.google.fr">xxxxxxx</a>
		</div>
	</section>
	
	<section class="slide" style="background-color:#d5632a;">
		<div>
			<div class="vis" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/710995/tennis-woman-600.png);"></div>
			<h1>Lorem Ipsum bla bla</h1>
			<p>Client : <strong>Nouveau Monde DDB</strong></p>
			<p>Type de réalisation : <b>Site internet</b></p>
			<a href="http://www.google.fr">xxxxxxxxx</a>
		</div>
	</section>

	<section class="slide" style="background-color:#b1987b;">
		<div>
			<div class="vis" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/710995/vin.png);"></div>
			<h1>Lorem Ipsum bla bla</h1>
			<p>Client : <strong>7 une bonne idée</strong></p>
			<p>Type de réalisation : <b>Site internet</b></p>
			<a href="http://www.google.fr">xxxxxxxxxxxxx</a>
		</div>
	</section>
	
	<section class="slide" style="background-color:#ff6801;">
		<div>
			<div class="vis" style="background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/710995/chaise.png);"></div>
			<h1>Lorem Ipsum bla bla</h1>
			<p>Client : <strong>Xanadu</strong></p>
			<p>Type de réalisation : <b>Site internet</b></p>
			<a href="http://www.google.fr">xxxxxxxxxx</a>
		</div>
	</section>
	


	<div id="slcontent">
		<div id="slprojet" class="line"><div><span>projet </span> <span class="scroll"></span></div></div>
		<div id="sltype" class="line"><div><span>type </span> <span class="scroll"></span></div></div>
		<div id="slclient" class="line"><div>xxx</div></div>		
		<div id="slcompteur"><div><b><span>0<br>0<br>0<br>0<br></span><span>0<br>0<br>0<br>0<br></span><span></span></b><i>000</i></div></div>
		<div id="slother" class="line"><div><span>Blabla </span> <span class="scroll">...<br>Lorem ipsum dolor sit amet consectetur adipiscing elit<br>Lorem Ipsum<br>Lorem Ipsum<br>Lorem Ipsum<br>Lorem Ipsum</span></div></div>
		<a href="" id="more" class="hide"><i></i><i></i><i></i><i></i></a>
	</div>
	
</div>
              
            
!

CSS

              
                * { -o-box-sizing: border-box; box-sizing: border-box; }
body{ margin:0; padding:0; font-size:14px; font-family: 'Oswald',sans-serif; font-weight:400;}

#Logo{ position:fixed; top:40px; right:40px; width:100px; height:100px; display:block; z-index:5000; background:#ffffff;}


#slider{ position:absolute; top:0; left:0; width:100%; height:100%; color:#14151d; overflow:hidden; }
#slider .slide{ overflow:hidden; z-index:50; position:absolute; top:0; right:0; width:0; height:100%; }
#slider .slide:first-child{ width:100%;}




#slider .slide>div{ width:100vw; height:100%;  position:absolute; top:0; right:0; background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/710995/transparent-noise.png);}



#slider .slide .vis{ width:600px; height:600px; background-position:center center; background-repeat:no-repeat; background-size:contain; position:absolute; top:calc(50% - 300px); left:calc(50% - 300px); opacity:0.5; filter:grayscale(1); mix-blend-mode:overlay;}

#slider .slide:not(:first-child) h1,#slider .slide:not(:first-child) p,#slider .slide:not(:first-child) a{ display:none; }


#slcontent{ width:100%; height:60%; display:table; z-index:70; position:absolute; top:20%; left:0;}

#slcontent>div{ display:table-row; transform:translateY(50px); opacity:0; }
#slcontent>div>div{ display:table-cell; vertical-align:middle; }

#slclient>div{ padding-left:27vw;}

#slprojet>div{ padding-left:15vw;}

#slcompteur{height:130px; font-family: 'Oswald',sans-serif; font-weight:700;   }
#slcompteur>div{ padding-left:15vw; display:block; position:absolute; height:125px; overflow:hidden;  }
#slcompteur b{ color:#ffffff; opacity:0.3; font-size:200px; margin-top:-16px; line-height:180px; display:inline-block; vertical-align:middle; }
#slcompteur b>span{ display:inline-block; text-align:center; vertical-align:top; height:150px; overflow:hidden;}
#slcompteur i{ color:#ffffff; line-height:20px; font-size:20px; font-style:normal; display:inline-block; vertical-align:top;}

#sltype>div{ padding-left:40vw;}


#slother>div{ padding-left:20vw;}

#slider .line span{ display:inline-block; position:relative; line-height:18px; height:18px; vertical-align:top; }
#slider .line .scroll{ overflow:hidden;color:#ffffff;}

#slider .line>div>span:first-child:before{ content:""; display:block; height:1px; width:20px; right:calc(100% + 4px); bottom:4px; position:absolute; background:#14151d;}
#slider .line>div>span:first-child:after{ content:""; display:block; height:1px; width:100vw; right:calc(100% + 34px); bottom:4px; background:#ffffff; position:absolute; opacity:0.4; }

#more{ display:block; font-weight:100; font-family:arial; width:40px; height:40px; color:#ffffff; text-decoration:none; position:absolute; top:calc(50% - 20px); right:30vw; transition:all 0.2s linear; }
#more i{ display:block; position:absolute; background:#ffffff; transition:all 0.2s ease-out;}
#more i:nth-child(1){ width:20px; height:4px; top:calc(50% - 2px);}
#more i:nth-child(2){ width:4px; height:20px; left:calc(50% - 2px);}
#more i:nth-child(3){ width:20px; height:4px; top:calc(50% - 2px); right:0px;}
#more i:nth-child(4){ width:4px; height:20px; left:calc(50% - 2px); bottom:0px;}

#more.hide{ pointer-events:none; }
#more.hide i:nth-child(1){ transform:translateX(-60px); opacity:0; }
#more.hide i:nth-child(2){ transform:translateY(-60px); opacity:0;}
#more.hide i:nth-child(3){transform:translateX(60px); opacity:0;}
#more.hide i:nth-child(4){ transform:translateY(60px); opacity:0;}

#more:hover{ width:50px; height:50px; top:calc(50% - 25px); right:calc(30vw - 5px);}
              
            
!

JS

              
                Init();


//===============================================================================
//==== INIT =====================================================================
//===============================================================================
function Init(){
	$AnimInProgress=false;//debloque l'animation
	$NumSl = $('.slide').length;
	$('#slcompteur').find('i').html(LeadingZero($NumSl-1,3));
	$CurrSl=1;
	$Zindex=100;
	vClients=vProjets=vType=vCompteur=vLeadZero="";
	ct=0;
	$('.slide').each(function(){
		vClients = vClients+$(this).find('strong').html()+"<br>";
		vProjets = vProjets+$(this).find('h1').html()+"<br>";
		vType = vType+$(this).find('b').html()+"<br>";
		vLeadZero = vLeadZero+"0<br>";
		vCompteur = vCompteur+ct+"<br>";
		ct=ct+1;
	});
	$('#slclient').find('div').html('<span>client</span> <span class="scroll">'+vClients+'</span>');
	$('#slprojet').find('div').html('<span>projet</span> <span class="scroll">'+vProjets+'</span>');
	$('#sltype').find('div').html('<span>type</span> <span class="scroll">'+vType+'</span>');
	$('#slcompteur').find('b>span:nth-child(2),b>span:nth-child(1)').html(vLeadZero);
	$('#slcompteur').find('b>span:nth-child(3)').html(vCompteur);
	$('#more').addClass('hide');
	var indicator = new WheelIndicator({elem:document.querySelector('#slider'),callback: function(e){ ScrollMe(e.direction); }});
	indicator.getOption('preventMouse');
	
	
	Jump2Slide(1);
}

//===============================================================================
//==== ON SCROLL ================================================================
//===============================================================================
function ScrollMe(Direction){
	if($AnimInProgress==false){
		if(Direction=='down'){
			
			$AnimInProgress=true;//bloque l'animation
			$ThisSl = $(".slide:nth-child("+$CurrSl+")");//definit panneau sortant
			if($CurrSl<$NumSl){$CurrSl+=1;}else if($CurrSl==$NumSl){$CurrSl=1;}
			$VisOrigine = '100px';
			$VisOut = '-100px';
		}else if(Direction=='up' && $CurrSl>1){
			$AnimInProgress=true;//bloque l'animation
			$ThisSl = $(".slide:nth-child("+$CurrSl+")");//definit panneau sortant
			$CurrSl-=1;
			$VisOrigine = '-100px';
			$VisOut = '100px';
		}else{
			$AnimInProgress=false;//debloque l'animation
			exit;
		}
		$Zindex +=1;
		SwitchSlider();
	}
}

function Jump2Slide(n){
	if($AnimInProgress==false){
		$AnimInProgress=true;//bloque l'animation
		$ThisSl = $(".slide:nth-child("+$CurrSl+")");//definit panneau sortant
		if($CurrSl>n){
			$VisOrigine = '-100px';
			$VisOut = '100px';
		}else{
			$VisOrigine = '100px';
			$VisOut = '-100px';
		}

		$CurrSl=n+1;
		$Zindex +=1;
		SwitchSlider();
	}
}

//===============================================================================
//==== SWITCH PANE ==============================================================
//===============================================================================
function SwitchSlider(){
	$('#more').addClass('hide');//cache le +
	$SlCible = $(".slide:nth-child("+$CurrSl+")");//definit paneau entrant
	$SlCible.css('z-index',$Zindex);//force le nouveau z-index du panneau cible
	$('#slcontent').css('z-index',$Zindex+20);//force le nouveau z-index du bloc ligne+compteur
	CibleScrollLine = ($CurrSl - 1) * 18;//increment ligne
	CibleScrollCompteur = ($CurrSl - 1) * 180;//increment compteur
	if($CurrSl==1){
		TweenMax.to($('#slcontent').find('div'),0.5,{y:'50px',opacity:0,ease:Power4.easeOut});//Masque les lignes et le compteur
	}else{
		TweenMax.staggerTo($('#slcontent').find('div'),1,{y:'0px',opacity:1,ease:Power4.easeOut},0.05);//Affiche les lignes et le compteur
	}
	
	TweenMax.fromTo($ThisSl.find('.vis'),1, {y:'0px',ease:Power4.easeOut}, {y:$VisOut});//masque ancien visuel
	TweenMax.fromTo($SlCible.find('.vis'),1, {y:$VisOrigine,ease:Power4.easeOut}, {y:'0px'});//affiche nouveau visuel
	TweenMax.staggerTo($('.line').find('.scroll'),0.6, {scrollTo:{y:CibleScrollLine, x:0},ease:Expo.easeOut},0.1);//scroll les lignes
	TweenMax.staggerTo($('#slcompteur').find('span'),0.6, {scrollTo:{y:CibleScrollCompteur, x:0},ease:Expo.easeOut},0.1);//scroll le compteur
	//change de panneau
	TweenMax.to($SlCible,1.1,{width:'100%',onComplete:function(){
		if($SlCible.find('a').length){
			$('#more').attr('href',$SlCible.find('a').attr('href')).removeClass('hide');
		}//cache le + si pas de lien
		$(".slide:not(:nth-child("+$CurrSl+"))").css('width','0%');//init autres panneaux
		$AnimInProgress=false;//debloque l'animation
	}});
}

function LeadingZero(number,width){
	width -= number.toString().length; if (width>0){ return new Array( width + (/\./.test( number ) ? 2 : 1) ).join( '0' ) + number; } return number + "";
}
              
            
!
999px

Console