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.

            
              <div class="container">
			<!-- Top Navigation -->			
			<div id="main" class="main">
				<figure>
					<div class="drawings mac">												
							<!--Path-->
	<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="60%" height="120%" viewBox="0 0 720 630" enable-background="new 0 0 1000 1000" xml:space="preserve">
	 <path class="line-drawing" stroke-dasharray="10,10" d="m 44,224 c 0,0 43.927961,124.1823 174,-22 C 320.12609,87.224932 381.70315,-0.57112498 451,56 c 92.49343,75.50787 -130,223 -145,235 -15,12 -79,74 -28,106 51,32 122,10 175,-48 53,-58 172,-186 172,-186 l 0,0 0,0"
          stroke="lightgrey" stroke-width="2" 
          fill="none" id="theMotionPath" opacity="1"/>

<!--HTML5 Cloud-->

<g transform="translate(160,150)">

	<path opacity="0.2" fill="#8A8A7B" d="M90.879,17.592c-3.542,0-6.88,0.917-9.827,2.529C78.989,9.77,70.351,2,60.006,2
	C49.565,2,40.864,9.912,38.903,20.407c-1.821-0.532-3.737-0.823-5.717-0.823c-11.884,0-21.518,10.249-21.518,22.892
	c0,12.643,9.634,22.892,21.518,22.892c4.967,0,9.535-1.794,13.177-4.8c2.419,9.826,10.821,17.077,20.815,17.077
	c9.134,0,16.933-6.058,20.056-14.6c1.185,0.214,2.402,0.333,3.645,0.333c11.884,0,21.518-10.249,21.518-22.892
	C112.397,27.842,102.763,17.592,90.879,17.592z"/>
<path opacity="0.7" fill="#10C6C1" d="M81.211,17.592c-3.542,0-6.879,0.917-9.827,2.529C69.321,9.77,60.683,2,50.337,2
	c-10.44,0-19.142,7.912-21.103,18.407c-1.82-0.532-3.736-0.823-5.717-0.823C11.634,19.584,2,29.833,2,42.476
	c0,12.643,9.634,22.892,21.518,22.892c4.967,0,9.537-1.794,13.178-4.8c2.419,9.826,10.82,17.077,20.815,17.077
	c9.132,0,16.933-6.058,20.057-14.6c1.185,0.214,2.401,0.333,3.644,0.333c11.884,0,21.519-10.249,21.519-22.892
	C102.729,27.842,93.095,17.592,81.211,17.592z"/>
<text transform="matrix(0.94 0 0 1 28.125 47.7778)" fill="#FFFFFF" font-family="'Raleway'" font-size="18.2218">HTML5</text>
	<path opacity="0.4" fill="#FFFFFF" d="M15.995,25.709c-1.026,1.373-3.059,2.282-4.212,3.73c-2.905,3.652-4.78,8.659-4.326,13.479
		c0.771,8.185,6.633,16.139,14.869,15.515c-1.208,0.093-4.437-3.568-5.273-4.435c-1.796-1.859-3.314-4.018-4.287-6.484
		c-1.558-3.946-1.945-8.881-0.865-13.032C12.668,31.537,14.205,28.101,15.995,25.709z"/>
	<path opacity="0.4" fill="#FFFFFF" d="M41.019,59.395c0,0,3.918,12.51,13.565,13.471c0,0,9.044,1.925,15.075-8.019
		c0,0-10.1,4.011-15.526,3.048C54.132,67.896,47.349,66.932,41.019,59.395z"/>			
</g>

<!--End of HTML5 Cloud-->


<!--CSS3 Cloud-->

<g transform=" translate(300,15)">
	<path opacity="0.2" fill="#8A8A7B" d="M91.947,10.628c-4.33,0-8.391,1.137-11.91,3.121C75.044,6.646,66.795,2,57.455,2
	C43.27,2,31.59,12.708,30.045,26.481c-0.703-0.105-1.417-0.177-2.149-0.177c-7.98,0-14.451,6.471-14.451,14.451
	c0,7.981,6.471,14.451,14.451,14.451c2.295,0,4.458-0.549,6.385-1.501c2.381,12.815,13.611,22.521,27.116,22.521
	c11.667,0,21.634-7.246,25.669-17.479c1.576,0.321,3.207,0.49,4.881,0.49c13.422,0,24.303-10.882,24.303-24.304
	S105.369,10.628,91.947,10.628z"/>
<path opacity="0.7" fill="#10C6C1" d="M80.501,10.628c-4.33,0-8.391,1.137-11.911,3.121C63.6,6.646,55.35,2,46.01,2
	C31.824,2,20.145,12.708,18.6,26.481c-0.703-0.105-1.416-0.177-2.149-0.177C8.47,26.304,2,32.774,2,40.755
	c0,7.981,6.47,14.451,14.45,14.451c2.295,0,4.458-0.549,6.385-1.501c2.381,12.815,13.612,22.521,27.116,22.521
	c11.667,0,21.634-7.246,25.669-17.479c1.576,0.321,3.209,0.49,4.881,0.49c13.422,0,24.303-10.882,24.303-24.304
	S93.923,10.628,80.501,10.628z"/>
<text transform="matrix(1 0 0 1 30.8862 44.104)" fill="#FFFFFF" font-family="'Monaco'" font-size="18.9378">CSS3</text>
<path opacity="0.4" fill="#FFFFFF" d="M31.941,49.394c0,0-1.5,29.5,24,18.5C55.941,67.894,39.941,68.394,31.941,49.394z"/>		
</g>

<!--End of CSS3 Cloud-->

<!--JQuery Cloud-->

<g transform=" translate(400,100)">
   <path opacity="0.2" fill="#8A8A7B" d="M105.216,12.559c-5.544,0-10.732,1.515-15.183,4.147C84.781,8.116,75.317,2.383,64.514,2.383
	c-14.39,0-26.401,10.17-29.247,23.713c-11.473,1.409-20.358,11.179-20.358,23.031c0,12.82,10.393,23.214,23.212,23.214
	c4.353,0,8.42-1.2,11.9-3.283c2.624,9.943,11.676,17.274,22.443,17.274c10.291,0,19.012-6.699,22.054-15.972
	c3.324,1.275,6.927,1.981,10.698,1.981c16.509,0,29.891-13.384,29.891-29.891C135.107,25.942,121.725,12.559,105.216,12.559z"/>
<path opacity="0.7" fill="#10C6C1" d="M92.308,12.559c-5.544,0-10.732,1.515-15.183,4.147C71.872,8.116,62.41,2.383,51.607,2.383
	c-14.391,0-26.401,10.17-29.248,23.713C10.886,27.505,2,37.275,2,49.127c0,12.82,10.393,23.214,23.212,23.214
	c4.353,0,8.42-1.2,11.9-3.283c2.625,9.943,11.676,17.274,22.443,17.274c10.291,0,19.012-6.699,22.057-15.972
	c3.321,1.275,6.925,1.981,10.696,1.981c16.508,0,29.891-13.384,29.891-29.891C122.199,25.942,108.816,12.559,92.308,12.559z"/>
<text transform="matrix(1 0 0 1 25.5166 52.3013)" fill="#FFFFFF" font-family="'Monaco'" font-size="19.7203">JQUERY</text>
<path opacity="0.4" fill="#FFFFFF" d="M16,32.519c0,0-12,7-9,18.5c0,0,3.5,12,16.5,12c0,0-11-6.5-11-16
	C12.5,47.019,12.5,40.019,16,32.519z"/>
<path opacity="0.4" fill="#FFFFFF" d="M41.049,66.044c0,0,4.513,13.537,15.62,14.579c0,0,10.413,2.082,17.354-8.678
	c0,0-11.627,4.339-17.875,3.297C56.148,75.243,48.339,74.201,41.049,66.044z"/>	
</g>

<!--End of JQuery Cloud-->

<!--Less Cloud-->

<g transform=" translate(180,325)">
	<path opacity="0.2" fill="#8A8A7B" d="M87.317,10.475c-4.618,0-8.938,1.262-12.645,3.452C70.299,6.774,62.417,2,53.42,2
	c-11.986,0-21.993,8.475-24.358,19.759C19.51,22.934,12.11,31.06,12.11,40.928c0,10.677,8.655,19.332,19.33,19.332
	c3.634,0,7.021-1.021,9.924-2.764c2.178,8.29,9.702,14.415,18.677,14.415c8.569,0,15.826-5.581,18.36-13.303
	c2.769,1.063,5.772,1.651,8.916,1.651c13.747,0,24.892-11.145,24.892-24.893S101.064,10.475,87.317,10.475z"/>
<path opacity="0.7" fill="#10C6C1" d="M77.207,10.475c-4.618,0-8.938,1.262-12.645,3.452C60.188,6.774,52.308,2,43.311,2
	c-11.987,0-21.994,8.475-24.359,19.759C9.399,22.934,2,31.06,2,40.928C2,51.604,10.655,60.26,21.331,60.26
	c3.634,0,7.021-1.021,9.923-2.764c2.178,8.29,9.702,14.415,18.678,14.415c8.568,0,15.825-5.581,18.359-13.303
	c2.77,1.063,5.773,1.651,8.916,1.651c13.747,0,24.893-11.145,24.893-24.893S90.954,10.475,77.207,10.475z"/>
<text transform="matrix(1 0 0 1 30.3545 43.8311)" fill="#FFFFFF" font-family="'Monaco'" font-size="18.9378">LESS</text>
<path opacity="0.4" fill="#FFFFFF" d="M14.078,27.457c0,0-9.385,5.474-7.038,14.468c0,0,2.737,9.385,12.903,9.385
	c0,0-8.602-5.084-8.602-12.513C11.342,38.797,11.342,33.323,14.078,27.457z"/>
<path opacity="0.4" fill="#FFFFFF" d="M34.842,53.797c0,0,3.923,11.769,13.579,12.674c0,0,9.052,1.81,15.087-7.544
	c0,0-10.107,3.771-15.539,2.867C47.969,61.794,41.179,60.888,34.842,53.797z"/>		
</g>

<!--End of Less Cloud-->

<!--SASS Cloud-->

<g transform=" translate(370,330)">
	<path opacity="0.2" fill="#8A8A7B" d="M87.316,10.939c-4.617,0-8.938,1.262-12.645,3.452C70.299,7.239,62.418,2.465,53.42,2.465
	c-11.986,0-21.994,8.475-24.359,19.759c-9.551,1.175-16.951,9.301-16.951,19.169c0,10.677,8.656,19.332,19.332,19.332
	c3.633,0,7.02-1.021,9.922-2.764c2.178,8.29,9.703,14.415,18.678,14.415c8.568,0,15.826-5.581,18.359-13.303
	c2.77,1.063,5.773,1.651,8.916,1.651c13.748,0,24.893-11.145,24.893-24.893S101.064,10.939,87.316,10.939z"/>
<path opacity="0.7" fill="#10C6C1" d="M77.207,10.939c-4.619,0-8.939,1.262-12.645,3.452C60.188,7.239,52.307,2.465,43.311,2.465
	c-11.986,0-21.994,8.475-24.359,19.759C9.398,23.398,2,31.524,2,41.393c0,10.677,8.654,19.332,19.33,19.332
	c3.635,0,7.021-1.021,9.924-2.764c2.178,8.29,9.703,14.415,18.678,14.415c8.568,0,15.824-5.581,18.359-13.303
	c2.77,1.063,5.773,1.651,8.916,1.651c13.746,0,24.893-11.145,24.893-24.893S90.953,10.939,77.207,10.939z"/>
<text transform="matrix(1 0 0 1 30.354 44.2959)" fill="#FFFFFF" font-family="'Monaco'" font-size="18.9378">SAAS</text>
<path opacity="0.4" fill="#FFFFFF" d="M14.234,29.677c0,0-9.385,5.475-7.037,14.469c0,0,2.736,9.384,12.902,9.384
	c0,0-8.602-5.083-8.602-12.513C11.498,41.017,11.498,35.542,14.234,29.677z"/>
<path opacity="0.4" fill="#FFFFFF" d="M35.35,53.855c0,0,3.922,11.769,13.578,12.674c0,0,9.053,1.81,15.088-7.544
	c0,0-10.109,3.771-15.541,2.867C48.475,61.853,41.686,60.946,35.35,53.855z"/>		
</g>

<!--End of SASS Cloud-->

<!--Bootstrap Cloud-->

<g transform="translate(470,200)">
	<path opacity="0.2" fill="#8A8A7B" d="M130.238,23.619c-5.121,0-9.947,1.244-14.207,3.436
	c-2.984-14.069-15.475-24.629-30.433-24.629c-15.096,0-27.678,10.754-30.51,25.018c-2.635-0.725-5.404-1.119-8.268-1.119
	c-17.182,0-31.111,13.93-31.111,31.111c0,17.184,13.93,31.113,31.111,31.113c7.18,0,13.787-2.438,19.053-6.524
	c3.498,13.354,15.645,23.207,30.096,23.207c13.206,0,24.483-8.232,28.999-19.841c1.713,0.292,3.473,0.452,5.27,0.452
	c17.184,0,31.113-13.929,31.113-31.112C161.352,37.549,147.422,23.619,130.238,23.619z"/>
<path opacity="0.7" fill="#10C6C1" d="M118.021,23.619c-5.121,0-9.947,1.244-14.207,3.436C100.83,12.985,88.341,2.426,73.382,2.426
	c-15.094,0-27.676,10.754-30.51,25.018c-2.635-0.725-5.404-1.119-8.268-1.119c-17.182,0-31.111,13.93-31.111,31.111
	c0,17.184,13.93,31.113,31.111,31.113c7.182,0,13.787-2.438,19.053-6.524c3.498,13.354,15.645,23.207,30.096,23.207
	c13.207,0,24.483-8.232,28.999-19.841c1.715,0.292,3.473,0.452,5.27,0.452c17.184,0,31.113-13.929,31.113-31.112
	C149.135,37.549,135.205,23.619,118.021,23.619z"/>
<text transform="matrix(1 0 0 1 26.3374 64.0923)" fill="#FFFFFF" font-family="'Monaco'" font-size="18.9378">BOOTSTRAP</text>
<path opacity="0.4" fill="#FFFFFF" d="M23.767,37.878c-1.406,1.768-4.191,2.939-5.771,4.807c-3.98,4.702-6.553,11.14-5.932,17.35
	c1.059,10.543,9.092,20.79,20.381,19.986c-1.656,0.118-6.082-4.598-7.229-5.714c-2.459-2.394-4.539-5.175-5.875-8.353
	c-2.135-5.082-2.664-11.44-1.186-16.775C19.208,45.386,21.313,40.96,23.767,37.878z"/>
<path opacity="0.4" fill="#FFFFFF" d="M60.79,80.032c0,0,5.293,15.875,18.316,17.096c0,0,12.211,2.441,20.351-10.176
	c0,0-13.634,5.088-20.96,3.867C78.497,90.819,69.339,89.597,60.79,80.032z"/>	
</g>

<!--End of Bootstrap Cloud-->

<!--Rocket-->

<g transform="translate(10,-52.5) rotate(15)">
	<polygon opacity="0.2" fill="#8A8A7C" points="142.837,19.738 141.327,20.024 142.038,19.786 142.837,19.738 142.377,19.672 
		142.518,19.625 142.181,19.646 0,0 18.394,27.408 18.16,27.422 6.735,65.015 6.564,65.19 39.987,56.259 49.945,71.875 	"/>
	<polygon fill="#FFD23A" points="27.445,24.24 17.522,55.773 129.684,16.064 	"/>
	<g>
		<polygon opacity="0.3" fill="#232323" points="27.445,24.24 17.522,55.773 129.684,16.064 		"/>
		<polygon fill="#FFD23A" points="17.406,55.833 37.286,35.525 46.716,47.45 		"/>
		<polygon fill="#FFD23A" points="12.9,1.66 27.704,24.329 129.942,16.151 		"/>
		<polygon fill="#FFD23A" points="37.286,35.525 129.942,16.151 52.946,60.807 		"/>
	</g>
	<polygon opacity="0.1" fill="#282828" points="17.406,55.833 37.286,35.525 45.019,47.897 	"/>
	<animateMotion dur="4s" repeatCount="1" rotate="auto" fill="freeze">
           <mpath xlink:href="#theMotionPath"/>
        </animateMotion>
</g>

<!--End of Rocket-->
						</svg>
					</div>					
				</figure>				
			</div>		
		</div><!-- /container -->	  
            
          
!
            
              (function() {

	'use strict';

	var docElem = window.document.documentElement;

	window.requestAnimFrame = function(){
		return (
			window.requestAnimationFrame       || 
			window.webkitRequestAnimationFrame || 
			window.mozRequestAnimationFrame    || 
			window.oRequestAnimationFrame      || 
			window.msRequestAnimationFrame     || 
			function(/* function */ callback){
				window.setTimeout(callback, 1000 / 200);
			}
		);
	}();

	window.cancelAnimFrame = function(){
		return (
			window.cancelAnimationFrame       || 
			window.webkitCancelAnimationFrame || 
			window.mozCancelAnimationFrame    || 
			window.oCancelAnimationFrame      || 
			window.msCancelAnimationFrame     || 
			function(id){
				window.clearTimeout(id);
			}
		);
	}();

	function SVGEl( el ) {
		this.el = el;
		this.image = this.el.previousElementSibling;
		this.current_frame = 0;
		this.total_frames = 230;
		this.path = new Array();
		this.length = new Array();
		this.handle = 0;
		this.init();
	}

	SVGEl.prototype.init = function() {
		var self = this;
		[].slice.call( this.el.querySelectorAll( 'path' ) ).forEach( function( path, i ) {
			self.path[i] = path;
			var l = self.path[i].getTotalLength();
			self.length[i] = l;

			self.path[i].style.strokeDasharray = l; 
			self.path[i].style.strokeDashoffset = l;
		} );
	};

	SVGEl.prototype.render = function() {
		if( this.rendered ) return;
		this.rendered = true;
		this.draw();
	};

	SVGEl.prototype.draw = function() {
		var self = this,
			progress = this.current_frame/this.total_frames;
		if (progress > 1) {
			window.cancelAnimFrame(this.handle);
			this.showImage();
		} else {
			this.current_frame++;
			for(var j=0, len = this.path.length; j<len;j++){
				this.path[j].style.strokeDashoffset = Math.floor(this.length[j] * (1 - progress));
			}
			this.handle = window.requestAnimFrame(function() { self.draw(); });
		}
	};

	SVGEl.prototype.showImage = function() {
		classie.add( this.image, 'show' );
		classie.add( this.el, 'hide' );
	};

	function getViewportH() {
		var client = docElem['clientHeight'],
			inner = window['innerHeight'];
		 
		if( client < inner )
			return inner;
		else
			return client;
	}
 
	function scrollY() {
		return window.pageYOffset || docElem.scrollTop;
	}
 
	// http://stackoverflow.com/a/5598797/989439
	function getOffset( el ) {
		var offsetTop = 0, offsetLeft = 0;
		do {
			if ( !isNaN( el.offsetTop ) ) {
				offsetTop += el.offsetTop;
			}
			if ( !isNaN( el.offsetLeft ) ) {
				offsetLeft += el.offsetLeft;
			}
		} while( el = el.offsetParent )
 
		return {
			top : offsetTop,
			left : offsetLeft
		};
	}
 
	function inViewport( el, h ) {
		var elH = el.offsetHeight,
			scrolled = scrollY(),
			viewed = scrolled + getViewportH(),
			elTop = getOffset(el).top,
			elBottom = elTop + elH,
			// if 0, the element is considered in the viewport as soon as it enters.
			// if 1, the element is considered in the viewport only when it's fully inside
			// value in percentage (1 >= h >= 0)
			h = h || 0;
 
		return (elTop + elH * h) <= viewed && (elBottom) >= scrolled;
	}
	
	function init() {
		var svgs = Array.prototype.slice.call( document.querySelectorAll( '#main svg' ) ),
			svgArr = new Array(),
			didScroll = false,
			resizeTimeout;

		// the svgs already shown...
		svgs.forEach( function( el, i ) {
			var svg = new SVGEl( el );
			svgArr[i] = svg;
			setTimeout(function( el ) {
				return function() {
					if( inViewport( el.parentNode ) ) {
						svg.render();
					}
				};
			}( el ), 10 ); 
		} );

		var scrollHandler = function() {
				if( !didScroll ) {
					didScroll = true;
					setTimeout( function() { scrollPage(); }, 60 );
				}
			},
			scrollPage = function() {
				svgs.forEach( function( el, i ) {
					if( inViewport( el.parentNode, 0.5 ) ) {
						svgArr[i].render();
					}
				});
				didScroll = false;
			},
			resizeHandler = function() {
				function delayed() {
					scrollPage();
					resizeTimeout = null;
				}
				if ( resizeTimeout ) {
					clearTimeout( resizeTimeout );
				}
				resizeTimeout = setTimeout( delayed, 10 );
			};

		window.addEventListener( 'scroll', scrollHandler, false );
		window.addEventListener( 'resize', resizeHandler, false );
	}

	init();

})();
            
          
!
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