123

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 id="table">
	<div id="centeralign">
<section class="cartridge">
 <div class="case">
  <figure class="front">
   <figure class="base tall"></figure>
   <figure class="base wide"></figure>
   <figure class="linebase"></figure>
   <figure class="line one"></figure>
   <figure class="line two"></figure>
   <figure class="line three"></figure>
   <figure class="line four"></figure>
   <figure class="leftindent"></figure>
   <figure class="rightindent"></figure>
   <figure class="oval"></figure>
   <figure class="label"></figure>
  </figure>

  <figure class="back">
   <figure class="base tall"></figure>
   <figure class="base wide"></figure>
   <figure class="line one"></figure>
   <figure class="line two"></figure>
   <figure class="line three"></figure>
   <figure class="line four"></figure>
  </figure>

  <figure class="rightside">
	  <figure class="top"></figure>
	  <figure class="bottom"></figure>
	  <figure class="line one"></figure>
	  <figure class="ceiling one"></figure>
	  <figure class="floor one"></figure>
	  <figure class="line two"></figure>
	  <figure class="ceiling two"></figure>
	  <figure class="floor two"></figure>
	  <figure class="line three"></figure>
	  <figure class="ceiling three"></figure>
	  <figure class="floor three"></figure>
	  <figure class="line four"></figure>
	  <figure class="ceiling four"></figure>
	  <figure class="floor four"></figure>
  </figure>
	 
	 <figure class="leftside">
	  <figure class="bottom"></figure>
	  <figure class="line one"></figure>
	  <figure class="ceiling one"></figure>
	  <figure class="floor one"></figure>
	  <figure class="line two"></figure>
	  <figure class="ceiling two"></figure>
	  <figure class="floor two"></figure>
	  <figure class="line three"></figure>
	  <figure class="ceiling three"></figure>
	  <figure class="floor three"></figure>
	  <figure class="line four"></figure>
	  <figure class="ceiling four"></figure>
	  <figure class="floor four"></figure>
  </figure>
	 
	 <figure class="topside">
		 <figure class="left"></figure>
		 <figure class="right"></figure>
	 </figure>
	 
	 <figure class="bottomside">
		 <figure class="side">
	 </figure>
	 
 </div>
</section>
	<div class="text">(made entirely with HTML & CSS)</div>
	</div>
	</div>
            
          
!
            
              // variables
$base-color: #a7a9ac;
$dark: #939598;
$darker: #828487;
$darkest: #727477;
$width: 200px;
$height: $width * 1.15;

figure {
	margin: 0;
	position: absolute;
}

.cartridge {
	display: inline-block;
	width: $width;
	height: $height;
	perspective: 1000px;
	transform-style: preserve-3d;
	
	.case {
		position: absolute;
		height: 100%;
		width: 100%;
		transform-style: preserve-3d;
	}
	
	.front, .back {
		display: block;
		height: 100%;
		width: 100%;
		
		.base {
			background-color: $base-color;
			position: absolute;
		}

		.tall {
			height: 50%;
			width: 90%;
			top: 0;
			left: 0;
		}

		.wide {
			height: 95%;
			width: 100%;
			bottom: 0;
			right: 0;
		}

		.linebase {
			position: absolute;
			background-color: $dark;
			width: 100%;
			height: 15%;
			top: 9%;
			left: 0;
		}

		.line {
			position: absolute;
			background-color: $base-color;
			width: 104%;
			left: -2%;
			height: calc(15%/9);
		}

		.leftindent, .rightindent {
			position: absolute;
			height: 65%;
			width: 2%;
			bottom: 0;
			background-color: $dark;
		}

		.rightindent {
			right: 0;
		}

		.oval {
			position: absolute;
			width: 75%;
			height: 15%;
			background-color: $dark;
			border: $base-color solid $width/50;
			border-radius: 10000000px;
			left: calc(12.5% - 2%);
			top: 7%;
		}

		.label {
			background-color: $darker;
			background-position: center;
			background-size: cover;
			height: $width * .7;
			width: 70%;
			bottom: 7%;
			left: calc(15% - 1%);
			position: absolute;
			border: $darker solid $width/100;
			border-radius: $width / 50;
		}
	}
	
	.front {
		transform: translateZ($width / 10 / 2);
	}
	
	.back {
		transform: translateZ(-$width / 10 / 2);
	}
	
	.rightside, .leftside {
		width: $width / 10;
		height: 100%;
		bottom: 0;
		right: - $width / 10 / 2;
		transform-style: preserve-3d;
		transform: rotateY(90deg);
		
		.top {
			background-color: $darker;
			width: 100%;
			height: 5%;
			transform: translateZ(- $width * .1);
		}
	
		.bottom {
			bottom: 0;
			background-color: $dark;
			width: 100%;
			height: 95%;
		}
		
		.line {
			background-color: $darker;
			height: calc(15%/9);
			width: 100%;
			transform: translateZ($width * .02);
		}
		
		.floor, .ceiling {
			background-color: $dark;
			width: 100%;
			height: $width * .04;
			transform: rotateX(90deg);
		}
		
		.ceiling {
			transform: translateY(- $height * .15 / 9) rotateX(90deg);
		}
	}
	
	.leftside {
		left: - $width / 10 / 2;
		.bottom {
			height: 100%;
		}
		
		.line {
			transform: translateZ(-$width * .02);
		}
	}
	
	.topside {
		width: 100%;
		height: $width * .1;
		top: -$width * .05;
		transform: rotateX(90deg);
		transform-style: preserve-3d;
		
		.left {
			background-color: $dark;
			width: 90%;
			height: 100%;
		}
		
		.right {
			background-color: $darker;
			width: 10%;
			height: 100%;
			right: 0;
			transform: translateZ(-$height * .05);
		}
	}
	
	.bottomside {
		background-color: #262626;
		bottom: -$width * .05;
		height: $width * .1 - $width * .05;
		width: $width - $width * .05;
		transform: rotateX(90deg);
		border: $darker $width * .025 solid;
	}
	
	.one {
		top: 9% + 15% / 9 * 1;
	}

	.two {
		top: 9% + 15% / 9 * 3;
	}

	.three {
		top: 9% + 15% / 9 * 5;
	}

	.four {
		top: 9% + 15% / 9 * 7;
	}
}

// extra display css
body, html{
	margin: 0;
	height: 100%;
	text-align: center;
}

.text {
	position: absolute;
	bottom: 15%;
	width: 100%;
	text-align: center;
	font-family: Courier New;
	text-transform: uppercase;
	font-size: 8pt;
	font-weight: 900;
	letter-spacing: 2pt;
}

#table {
	display: table;
	width: 100%;
	height: 100%;
	background: #f0f9ff; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #f0f9ff 0%, #a7a9ac 100%); /* FF3.6-15 */
background: -webkit-radial-gradient(center, ellipse cover, #f0f9ff 0%,#a7a9ac 100%); /* Chrome10-25,Safari5.1-6 */
background: radial-gradient(ellipse at center, #f0f9ff 0%,#a7a9ac 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0f9ff', endColorstr='#d3e3ff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

#centeralign {
	display: table-cell;
	vertical-align: middle;
}

.case {
  -webkit-animation: customrotate 20s infinite linear; /* Safari 4+ */
  -moz-animation:    customrotate 20s infinite linear; /* Fx 5+ */
  -o-animation:      customrotate 20s infinite linear; /* Opera 12+ */
  animation:         customrotate 20s infinite linear; /* IE 10+, Fx 29+ */
}

@-webkit-keyframes customrotate {
  0%   { transform: none}
  100%   { transform: rotateZ(360deg) rotateX(360deg)}
}
@-moz-keyframes customrotate {
  0%   { transform: none}
  100%   { transform: rotateZ(360deg) rotateX(360deg)}
}
@-o-keyframes customrotate {
  0%   { transform: none}
  100%   { transform: rotateZ(360deg) rotateX(360deg)}
}
@keyframes customrotate {
  0%   { transform: none}
  100%   { transform: rotateZ(360deg) rotateX(360deg)}
}


// customize catridge label

.label {
	background-image: url('http://pre08.deviantart.net/d867/th/pre/i/2012/114/a/9/pokemon_yellow_cover_art_by_comunello76-d4xfrr5.png');
}
            
          
!
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.

Console