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. 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

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

              
                <div class="wrapper">
	<div class="half half--top"></div>
	<div class="half half--bottom"></div>
</div>
<div class="open-btn-trigger">
	<button class="btn-open">Open</button>
</div>
	<div class="options">
		<button class="btn-close">Close</button>
		<div class="options__box">
			<!-- Top Background Color -->
			<div class="option__item">
				<label for="top-bg-color">Top BG Color</label>
				<input type="color" id="top-bg-color" name="top-bg-color" value="#ffffff"/>
			</div>
			<!-- Top Text Color -->
			<div class="option__item">
				<label for="top-text-color">Top Text Color</label>
				<input type="color" id="top-text-color" name="top-text-color" />
			</div>
			<!-- Top Stroke Color -->
			<div class="option__item">
				<label for="top-stroke-color">Top Stroke Color</label>
				<input type="color" id="top-stroke-color" name="top-stroke-color" />
			</div>
			<!-- Top Stroke width -->
			<div class="option__item">
				<label for="top-stroke-width">Top Stroke Width</label>
				<input type="range" id="top-stroke-width" name="top-stroke-width" value="0" min="0" max="50" />
			</div>
			<!-- Bottom Background Color -->
			<div class="option__item">
				<label for="bottom-bg-color">Bottom BG Color</label>
				<input type="color" id="bottom-bg-color" name="bottom-bg-color"/>
			</div>
			<!-- Bottom Text Color -->
			<div class="option__item">
				<label for="bottom-text-color">Bottom Text Color</label>
				<input type="color" id="bottom-text-color" name="bottom-text-color"  value="#ffffff"/>
			</div>
			<!-- Bottom Stroke Color -->
			<div class="option__item">
				<label for="bottom-stroke-color">Bottom Stroke Color</label>
				<input type="color" id="bottom-stroke-color" name="bottom-stroke-color"  value="#ffffff"/>
			</div>
			<!-- Bottom Stroke width -->
			<div class="option__item">
				<label for="bottom-stroke-width">Bottom Stroke Width</label>
				<input type="range" id="bottom-stroke-width" name="bottom-stroke-width" value="0" min="0" max="50" />
			<!-- Skew X Div -->
			<div class="option__item">
				<label for="skewdivx">SkewX div</label>
				<input type="range" id="skewdivx" name="skewdivx" value="0" min="-90" max="90" />
			</div>
			<!-- Skew Y Div -->
			<div class="option__item">
				<label for="skewdivy">SkewY div</label>
				<input type="range" id="skewdivy" name="skewdivy" value="0" min="-90" max="90" />
			</div>
			<!-- Skew X Content -->
			<div class="option__item">
				<label for="skewcontentx">SkewX content</label>
				<input type="range" id="skewcontentx" name="skewcontentx" value="0" min="-90" max="90" />
			</div>
			<!-- Skew Y Content -->
			<div class="option__item">
				<label for="skewcontenty">SkewY content</label>
				<input type="range" id="skewcontenty" name="skewcontenty" value="0" min="-90" max="90" />
			</div>
			<!-- Rotate X Content -->
			<div class="option__item">
				<label for="rotatecontentx">RotateX content</label>
				<input type="range" id="rotatecontentx" name="rotatecontentx" value="0" min="-90" max="90" />
			</div>
			<!-- Rkew Y Content -->
			<div class="option__item">
				<label for="rotatecontenty">RotateY content</label>
				<input type="range" id="rotatecontenty" name="rotatecontenty" value="0" min="-90" max="90" />
			</div>
			<!-- Scale X -->
			<div class="option__item">
				<label for="scalex">Scale X content</label>
				<input type="range" id="scalex" name="scalex" step=".1" value="1" min="0" max="5" />
			</div>
			<!-- Scale Y  -->
			<div class="option__item">
				<label for="scaley">Scale Y content</label>
				<input type="range" id="scaley" name="scaley" step=".1" value="1" min="0" max="5" />
			</div>
			<div class="option__item">
				<label for="show-top">Show Top</label>
				<input type="checkbox" id="show-top" name="show-top" checked />
			</div>
			<div class="option__item">
				<label for="show-bottom">Show Bottom</label>
				<input type="checkbox" id="show-bottom" name="show-bottom" checked />
			</div>
			<div class="option__item">
				<label for="main-direction">Main Direction</label>
				<select name="main-direction" id="main-direction">
					<option value="row">row</option>
					<option value="row-reverse">row reverse</option>
					<option value="column" selected>column</option>
					<option value="column-reverse">column reverse</option>
				</select>
			</div>
			<div class="option__item">
				<label for="half-direction">Half Direction</label>
				<select name="half-direction" id="half-direction">
					<option value="row" selected>row</option>
					<option value="row-reverse">row reverse</option>
					<option value="column">column</option>
					<option value="column-reverse">column reverse</option>
				</select>
			</div>
			<div class="option__item">
				<label for="on-top">On Top</label>
				<input type="checkbox" id="on-top" name="on-top" />
			</div>	
			<div class="option__item">
				<label for="blend-mode">Blend Mode</label>
				<select class="blend-mode" name="blend-mode" id="blend-mode">
						<option value="normal">normal</option>
						<option value="color">color</option>
						<option value="color-burn">color-burn</option>
						<option value="color-dodge">color-dodge</option>
						<option value="darken">darken</option>
						<option value="difference">difference</option>
						<option value="exclusion">exclusion</option>
						<option value="hard-light">hard-light</option>
						<option value="hue">hue</option>
						<option value="lighten">lighten</option>
						<option value="luminosity">luminosity</option>
						<option value="multiply">multiply</option>
						<option value="overlay">overlay</option>
						<option value="saturation">saturation</option>
						<option value="screen">screen</option>
						<option value="soft-light">soft Light</option>
				</select>
			</div>	
				
		</div>
		<!-- ///////////////////////////////// -->
		<div class="options__box">
			<div class="option__item">
				<label for="num-of-div">Number of Vertical Divisions</label>
				<input type="range" id="num-of-div" name="num-of-div" value="10" min="2" max="30" />
			</div>
			<div class="option__item">
				<label for="timing">timing</label>
				<input type="range" id="timing" name="timing" value="10" min="1" max="100" />
			</div>
			<div class="option__item">
				<label for="delay">delay</label>
				<input type="range" id="delay" name="delay" value="10" min="1" max="100" />
			</div>
			<div class="option__item">
				<label for="text">text</label>
				<input type="text" id="text" name="text" />
				<button class="text-ok">OK</button>
			</div>
			<div class="option__item">
				<label for="easing">Gsap Easing</label>
				<select name="easing" id="easing">
					<option value=""></option>
				</select>
			</div>
		</div>
	</div>
              
            
!

CSS

              
                body {
	font-weight: bold;
}

.wrapper {
	position: relative;
	width: 100%;
	height: 100vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	filter: url(#fancy-goo);
}

p {
	-webkit-text-stroke-width: 10px;
}

.half {
	width: 100%;
	height: 100%;
	display: flex;
	overflow: hidden;
	font-size: 40vh;
}

.half--top {
	color: black;
}

.half--bottom {
	background-color: black;
	color: white;
}


.division {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	overflow: hidden;
	perspective: 100px;
}

.division > * {
	line-height: 1;
	max-height: 100%;
	-webkit-text-stroke-color: inherit;
	-webkit-text-stroke-width: inherit;
	//filter: blur(20px) contrast(10);
}

.single .division p {
	line-height: 1;
	font-size: 100vh;
}

.half--top .division p {
	transform: translatex(-100%);
}

.half--bottom .division p {
	transform: translatex(100%);
}

.open-btn-trigger {
	width: 100px;
	height: 100px;
	position: fixed;
	top: 0;
	right: 0;
}

.btn-open {
	position: absolute;
	top: 20px;
	right: 20px;
	opacity: 1;
}

.open-btn-trigger:hover .btn-open {
	opacity: 1;
}

.btn-open--hide {
	display: none;
}

.btn-close {
	position: absolute;
	top: 20px;
	right: 20px;
}

.options {
	width: 400px;
	height: 100%;
	position: fixed;
	top: 0;
	right: 0;
	background-color: rgba(255,255,255, 1);
	z-index: 1000;
	transform: translatex(100%);
}

.options--open {
	transform: translatex(0%);
}
              
            
!

JS

              
                ///// FONT /////

var GFontApiKey = 'AIzaSyBRUDgk2xFItCoqwgNK33D1i-IKqDjGXag',
		GFontUrl = 'https://www.googleapis.com/webfonts/v1/webfonts?key=',
		GFontEndPoint = GFontUrl + GFontApiKey;

$.getJSON( GFontEndPoint, function( data ) {
  var items = [];
  $.each( data.items, function( key, val ) {
    items.push( "<option value='" + val.family + "'>" + val.family + "</option>" );
  });
 
  $( "<select/>", { 
		"class": "font-selector",
    html: items.join( "" )
  }).appendTo( ".options" );
});

var fetchLoadFont = function(fontName){
	WebFont.load({
		google: {
			families: [fontName]
		}
	});
	
	$('.half').css('font-family', fontName);
};

$('.options').on('change', '.font-selector', function(){
	var thisValue = $(this).val();
	fetchLoadFont(thisValue);
});

///// FONT /////

CSSPlugin.defaultSkewType = "simple";

var navIsOpen = false,
		btnOpen = $('.btn-open'),
		btnClose = $('.btn-close'),
		optionsSlide = $('.options'),
		currentValue = {
			division: 20,
			speed: 10,
			word: 'Romain',
			easing: Power0.easeNone,
			delay: 10,
			animDirection: 'left-to-right'
		};

var openOptions = function(){
	optionsSlide.addClass('options--open');
	btnOpen.addClass('btn-open--hide');
	
	navIsOpen = true;
}

var closeOptions = function(){
	optionsSlide.removeClass('options--open');
	btnOpen.removeClass('btn-open--hide');
	
	navIsOpen = false;
}

var division = function(howMany, word){
	$('.half').empty();
	for(i = 0; i < howMany; i++){
		var div = '<div class="division"><p>' + word + '</p></div>';
		$(div).prependTo($('.half'))
	}
}

var init = function(division, timing, gsapEase, delay, ){
	
	var divisionWidth = window.innerWidth / division;
	
	$('.half--top').find('.division').each(function(e){
	
		console.log(e);

		var toLeft = new TimelineMax({paused: true, delay: e/delay, repeat: -1, repeatDelay: .5}),
				p = $(this).find('p');

				toLeft.to(p, timing, {x: divisionWidth, ease: gsapEase})

				toLeft.play();

	});

	$('.half--bottom .division').each(function(e){

		console.log(e);

		var toRight = new TimelineMax({paused: true, delay: e/delay, repeat: -1, repeatDelay: .5}),
				p = $(this).find('p');

				toRight.fromTo(p, timing,{x: divisionWidth}, {x: '-100%', ease: gsapEase})

				toRight.play();

	});
	
	$('#skewdivx, #skewdivy, #skewcontentx, #skewcontenty, #rotatecontentx, #rotatecontenty, #scalex, #scaley').trigger('change');

	
};

//division(currentValue.division, currentValue.word);
//init(currentValue.division, currentValue.speed, currentValue.easing, currentValue.delay);

btnOpen.on('click', function(){
	openOptions();
});

btnClose.on('click', function(){
	closeOptions();
});

////////////////////////////

$('#num-of-div').on('change', function(){
	var thisValue = $(this).val();
	
	currentValue.division = thisValue;
	
	division(currentValue.division, currentValue.word);
	init(currentValue.division, currentValue.speed, currentValue.easing, currentValue.delay);
})

$('#timing').on('change', function(){
	var thisValue = $(this).val();
	
	currentValue.speed = thisValue;
	
	division(currentValue.division, currentValue.word);
	init(currentValue.division, currentValue.speed, currentValue.easing, currentValue.delay);
})

$('#delay').on('change', function(){
	var thisValue = $(this).val();
	
	currentValue.delay = thisValue;
	
	division(currentValue.division, currentValue.word);
	init(currentValue.division, currentValue.speed, currentValue.easing, currentValue.delay);
})

$('.text-ok').on('click', function(){
	var textValue = $('#text').val();
	
	currentValue.word = textValue;
	
	division(currentValue.division, currentValue.word);
	init(currentValue.division, currentValue.speed, currentValue.easing, currentValue.delay);
	
});

////////////////////////////

$('#top-bg-color').on('input', function(){
	var thisValue = $(this).val();
	$('.half--top').css('background-color', thisValue)
});

$('#top-text-color').on('input', function(){
	var thisValue = $(this).val();
	$('.half--top').css('color', thisValue)
});

$('#top-stroke-color').on('input', function(){
	var thisValue = $(this).val();
	$('.half--top').css('-webkit-text-stroke-color', thisValue)
});

$('#top-stroke-width').on('input', function(){
	var thisValue = $(this).val();
	$('.half--top').css('-webkit-text-stroke-width', thisValue + 'px')
});

$('#bottom-bg-color').on('change', function(){
	var thisValue = $(this).val();
	$('.half--bottom').css('background-color', thisValue)
});

$('#bottom-text-color').on('change', function(){
	var thisValue = $(this).val();
	$('.half--bottom').css('color', thisValue)
});

$('#bottom-stroke-color').on('input', function(){
	var thisValue = $(this).val();
	$('.half--bottom').css('-webkit-text-stroke-color', thisValue)
});

$('#bottom-stroke-width').on('input', function(){
	var thisValue = $(this).val();
	$('.half--bottom').css('-webkit-text-stroke-width', thisValue + 'px')
});

$('#skewdivx').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division'), 1, {skewX: thisValue});
});

$('#skewdivy').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division'), 1, {skewY: thisValue});
});

$('#skewcontentx').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division p'), 1, {skewX: thisValue});
});

$('#skewcontenty').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division p'), 1, {skewY: thisValue});
});

$('#rotatecontentx').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division p'), 1, {rotationX: thisValue});
});

$('#rotatecontenty').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division p'), 1, {rotationY: thisValue});
});



$('#scalex').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division p'), 1, {scaleX: thisValue});
});

$('#scaley').on('change', function(){
	var thisValue = $(this).val();
	TweenMax.to($('.half').find('.division p'), 1, {scaleY: thisValue});
});

var howMany = 2;

$('#show-top').on('change', function(){
	var topShow = $(this).is(":checked");
	
	if(topShow != true){
		$('.half--top').hide();
		
		howMany --
		
	} else {
		$('.half--top').show();
		
		howMany ++
		
	}
	
	if(howMany == 1){
		$('.half').css('font-size', '100vh')
	} else {
		$('.half').css('font-size', '')
	}

});


$('#show-bottom').on('change', function(){
	var topShow = $(this).is(":checked");
	
	if(topShow != true){
		$('.half--bottom').hide();
		
		howMany --
		} else {
		$('.half--bottom').show();
		
		howMany ++
	}
	
	if(howMany == 1){
		$('.half').css('font-size', '100vh')
	} else {
		$('.half').css('font-size', '50vh')
	}

});

$('#main-direction').on('change', function(){
	var thisValue = $(this).val();
	
	$('.wrapper').css('flex-direction', thisValue);
});

$('#half-direction').on('change', function(){
	var thisValue = $(this).val();
	
	$('.half').css('flex-direction', thisValue);
});

$('#on-top').on('change', function(){
	
	var onTop = $(this).is(":checked");
	
	if(onTop == true){
		$('.half').css({
			position : 'absolute',
			top : '0',
			left : '0'
		});
		
		} else {
			
		$('.half').css({
			position : '',
			top : '',
			left : ''
		});
		
	}
});

$('#blend-mode').on('change', function(){
	var thisValue = $(this).val();
	
	$('.half').css('mix-blend-mode', thisValue)
});

              
            
!
999px

Console