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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                
	<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
	<link href='https://fonts.googleapis.com/css?family=Oswald:700' rel='stylesheet' type='text/css'>
<body>
	<div id='holder'>
		<div id='innerHolder'>
			<div id='fan'></div>
			<div id='whitediamond'></div>
			<div class='ribbon' id='rib'>
				<div class='leftTri'>
					<div class='tri topright'></div>
					<div class='tri bottomright'></div>
					<div class='box leftone'></div>
				</div>
				<div class='mainBox'>
					<div class='copy'>A FILE NOT FOUND IS SO SAD</div> <!-- CHANGE IF YOU LIKE -->
					<div class='tri littletri-topright'></div>
					<div class='tri littletri-topleft'></div>
				</div>
				<div class='rightTri'>
					<div class='box rightone'></div>
					<div class='tri topleft'></div>
					<div class='tri bottomleft'></div>
				</div>
			</div>

			<div id='textbox'>
				<div id='ohyeah'>Oh Crap!</div>  <!-- YOUR CHOICE OF EXPLETIVE. BEST WITH A CAPITAL LETTER. -->
				<div id='itsa'>IT'S A 404</div> <!-- CHANGE IF YOU LIKE -->
			</div>
		</div>

		<div id='rib2'>
			<div class='leftTri'>
				<div class='tri topright'></div>
				<div class='tri bottomright'></div>
				<div class='box leftone'></div>
			</div>
			<div class='mainBox'>
				<div class='copy'><div id='hButt'>HOME</div> - <div id='cButt'>CONTACT</div></div>  <!-- CHANGE LINK NAMES TO SUIT -->
				<div class='tri littletri-topright'></div>
				<div class='tri littletri-topleft'></div>
			</div>
			<div class='rightTri'>
				<div class='box rightone'></div>
				<div class='tri topleft'></div>
				<div class='tri bottomleft'></div>
			</div>
		</div>
	</div>
</body>
              
            
!

CSS

              
                /********************    RESET    *************************/
		html, body, div, span, b, u, i, center, {
			margin: 0;
			padding: 0;
			border: 0;
			font-size: 100%;
			font: inherit;
			vertical-align: baseline;
		}
		body {line-height: 1;}
		*{-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}

		/*********************************************************/
		body {
			background-color: #fff;
			color:#fff;
			margin:0px;
			font-size: 35px;
			font-family: 'Oswald', sans-serif;
			overflow:hidden;
		}
		div{
    		 -webkit-perspective: 1000;
    		 -moz-perspective: 1000;
    		 perspective: 1000;
		}
		#holder{
			position: absolute;
			width: 100%;
			height: 100%;
			visibility: hidden;
		}
		#innerHolder{
			position: relative;
			width:410px;
		}
		#fan{
			position: relative;
			height: 600px;
			width: inherit;
			margin-left: auto;
			margin-right: auto;
			margin-top: 10px;
		}
		.fanline{
			position: absolute;
			top:230px;
			left:195px;
			width: 0;
			height: 0;
			border-left: 5px solid transparent;
			border-right: 5px solid transparent;
			border-top: 230px solid #ff6600;
		}
		#whitediamond{
			position:absolute;
			height:220px;
			width:220px;
			left:90px;
			top: 300px;
			border:0px solid #990000;
			background-color:#fff;
			text-align: center;
			margin:0 auto;
			margin-top: -200px;
			overflow: hidden;
			-ms-transform: rotate(45deg); 
			-webkit-transform: rotate(45deg);
			transform: rotate(45deg);
			-webkit-box-shadow:inset 0px 0px 0px 10px #fff,
					           inset 10px 10px 0px 5px #ff6600,
					   		   inset -10px -10px 0px 1px #ff6600, #ff6600 -1px -1px 0px, #ff6600 1px 1px 0px,  #ff6600 13px 13px 0px;
			-moz-box-shadow:inset 0px 0px 0px 10px #fff,
					        inset 10px 10px 0px 5px #ff6600,
					        inset -10px -10px 0px 1px #ff6600, #ff6600 -1px -1px 0px, #ff6600 1px 1px 0px,  #ff6600 13px 13px 0px;
			box-shadow:inset 0px 0px 0px 10px #fff,
					   inset 10px 10px 0px 5px #ff6600,
					   inset -10px -10px 0px 1px #ff6600, #ff6600 -1px -1px 0px, #ff6600 1px 1px 0px,  #ff6600 13px 13px 0px;
		}
		#textbox{
			position: absolute;
			width:inherit;
			height: 600px;
			top: 110px;
			left: -10px;
			text-align: center;
			margin-left: auto;
			margin-right: auto;
		}
		#ohyeah{
			position: relative;
			font-family: 'Lobster', cursive;
			font-size:80px;
			color: #990000;
			z-index: 3;
		  	margin:0 auto;
			-ms-transform: skewY(-10deg) translate(0, 0); 
		    -webkit-transform: skewY(-10deg) translate(0, 0);
		    transform: skewY(-10deg) translate(0, 0);
			text-shadow: #fff -3px -3px 0px,
						 #fff 3px -3px 0px,
						 #fff 3px 3px 0px,
						 #ff6600 4px 4px 0px,
						 #ff6600 6px 6px 0px,
						 #ff6600 8px 8px 0px
						 ;
		}
		#itsa{
			position: relative;
			top:25px;
			font-family: 'Oswald', sans-serif;
			font-size:65px;
			color: #990000;
			font-weight: 700;
			margin-top: -20px;
			z-index: 4;
		    -webkit-transform: skewY(-10deg) translate(0, 0);
			-ms-transform: skewY(-10deg) translate(0, 0); 
		    transform: skewY(-10deg) translate(0, 0);
			text-shadow: #fff -2px -2px 0px,
						 #fff 2px -2px 0px,
						 #fff 2px 2px 0px,
						 #fff 3px 2px 0px,
						 #ff6600 4px 4px 0px,
						 #ff6600 6px 6px 0px
						 ;
		}
		.ribbon{
			position: absolute;
			width:330px;
			height:150px;
			top:275px;
			left:40px;
		    -webkit-transform: skewY(-10deg) translate(0, 0);
			-ms-transform: skewY(-10deg) translate(0, 0); 
		    transform: skewY(-10deg) translate(0, 0);
		}
		#rib2{
			position: absolute;
		    left:0;
		    right:0;
			width:240px;
		  	margin:0 auto;
			bottom:30px;
		}
		.leftTri{
			position: absolute;
			top:10px;
			width:100px;
			height:40px;
		}
		.mainBox{
			position: absolute;
			background-color: #990000;
			font-size: 20px;
			font-weight: 400;
			line-height: .8;
			color: #fff;
			width:250px;
			height:40px;
			top:0;
			left: 40px;
			z-index: 2;
			-webkit-box-shadow: inset 0px 0px 0px 3px #fff;
			-moz-box-shadow: inset 0px 0px 0px 3px #fff;
			box-shadow: inset 0px 0px 0px 3px #fff;
			text-align: center;
			text-shadow: #990000 -1px 1px 0px,
						 #990000 1px 1px 0px,
						 #ff6600 2px 2px 0px,
						 #ff6600 3px 3px 0px
						 ;
		}
		#rib2 .mainBox{
			width:160px;
		}
		.rightTri{
			position: relative;
			top:0;
			left:0;
			top:-10px;
			left: 290px;
			width:100px;
			height:40px;
			z-index: -20
		}
		#rib2 .rightTri{
			left:200px;
		}
		.tri{
			position: absolute;
			top:0;
			left: 0;
			width: 0; 
			height: 0; 
		}
		.topright { 
			border-top: 40px solid #990000; 
			border-left: 40px solid transparent; 
		}
		.bottomright { 
			border-bottom: 40px solid #990000; 
			border-left: 40px solid transparent; 
		}
		.topleft { 
			border-top: 40px solid #990000; 
			border-right: 40px solid transparent; 
		}
		.bottomleft { 
			border-bottom: 40px solid #990000; 
			border-right: 40px solid transparent; 
		}
		.littletri-topright { 
			top:40px;
			border-top: 10px solid #ff6600; 
			border-left: 40px solid transparent; 
		}
		.copy{
			margin-top:10px;
		}
		.copy div{
			display:inline-block;
			cursor: pointer;
		}

		.littletri-topleft { 
			right:0;
			left:auto;
			top:-10px;
			border-bottom: 10px solid #ff6600; 
			border-right: 40px solid transparent; 
		}
		.box{
			position: absolute;
			background-color: #990000;
			width:40px;
			height:40px;
			top:0;
		}
		.leftone{
			left:40px;
		}
		.rightone{
			margin-left:-40px;
			background-color: #990000;
		}
              
            
!

JS

              
                (function(){
		var fullResize = false; // SET THIS TO true TO RESIZE TO FIT (AT THE EXPENSE OF A LITTLE BLURRYNESS IN CHROME)
		var homeLink = 'http://www.yourhome.com'; // CHANGE THIS TO YOUR HOME URL (OR WHATEVER)
		var contactLink = 'mailto:info@yourhome.com'; // CHANGE THIS TO YOUR CONTACT PAGE URL OR MAILTO LINK (OR WHATEVER)

		var stage = document.getElementById("innerHolder");
		var stageParent = document.getElementById("holder");
		var stageWidth, stageHeight, parentWidth, parentHeight, desiredWidth, desiredHeight, rescaleW, rescaleH, rect;

		function makeFan(num){
			var ang = 360/num;
			var swapper = false;
			for(var i = 0; i < num; ++i){
				var fLine = document.createElement("div");
				var element = document.getElementById("fan");
				element.appendChild(fLine);
				fLine.classList.add("fanline");
				if(swapper){
					TweenMax.set(fLine,{scaleY:'.75'});
				}
				swapper = !swapper;
				TweenMax.set(fLine,{transformOrigin:"center top", rotation:i*ang});
				TweenLite.from(fLine, .5, {scaleY:0, ease:Quad.easeOut, delay:(i/100)+.4, overwrite:'all'})
			}
		}

		var tl = new TimelineLite();
		TweenMax.set(holder,{visibility:'visible'});

		tl.from(whitediamond, .5, {scaleX:0, scaleY:0,rotation:-270, ease:Quad.easeOut, delay:.3})
			.from(ohyeah, .5, {scaleX:0, scaleY:0,rotation:-270, ease:Quad.easeOut}, '-=.3')
			.from(ohyeah, .4, {y:'+=65px', ease:Back.easeOut, delay:.5})
			.from(itsa, 1.1, {scaleX:0, scaleY:0, x:'+=40', y:'+=40', ease:Elastic.easeOut}, '-=.3')
			.from(rib, 1, {alpha:0, y:'+=100', skewY:'+=20', delay:.5, ease:Quint.easeOut})
			.from(rib2, 2, {alpha:0, y:'-=150', skewY:'-=20', ease:Quint.easeOut}, '-=.7')
		;

		makeFan(80);

	   function resizeit() {
			stageWidth = stage.offsetWidth;
			stageHeight = stage.offsetHeight;
			parentWidth = stageParent.offsetWidth;
			parentHeight = stageParent.offsetHeight;

			desiredWidth = Math.round(parentWidth * 1);
			desiredHeight = Math.round(parentHeight * 1);

			rescaleW = (desiredWidth/stageWidth);
			rescaleH = (desiredHeight/stageHeight);

			rect = stage.getBoundingClientRect().width;

			if(fullResize){
				if(parentWidth < rect){
					TweenLite.to(stage, .3, {scale:rescaleW, x:(parentWidth - stageWidth)/2, y:(parentHeight - stageHeight)/2, ease:Quad.easeOut})
				} else {
					TweenLite.to(stage, .3, {scale:rescaleH, x:(parentWidth - stageWidth)/2, y:(parentHeight - stageHeight)/2, ease:Quad.easeOut})
				}
			} else {
				if(stageParent.getBoundingClientRect().height < 600){
					TweenMax.set(stage, {scale:rescaleH});
				}
				TweenMax.set(stage, {x:(parentWidth - stageWidth)/2});
				TweenMax.set(stage, {y:(parentHeight - stageHeight)/2 });
			}

		 
	   }

	    window.onresize = resizeit;
	    resizeit();

	    function onROver(){
			TweenLite.to(this, 1, {scale:1.1, x:-3, y:-2, ease:Elastic.easeOut})
	    };
	    function onROut(){
			TweenLite.to(this, .6, {scale:1, x:0, y:0, ease:Bounce.easeOut})
	    };

	    hButt.onmouseover = onROver;
	    hButt.onmouseout = onROut;
	    cButt.onmouseover = onROver;
	    cButt.onmouseout = onROut;

	    hButt.onclick = function(){window.location.href = homeLink}
	    cButt.onclick = function(){window.location.href = contactLink}
	})();
              
            
!
999px

Console