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.

            
              <section class="shelf">
	<div>
		<!-- Blu ray case preview -->
		<article class="bluray case">
			<div>
        <div class="logo"><img src="http://cases.tb-one.se/img/bluray.png"></div>
				
				<div class="img">
					<span></span>
				</div>
			</div>
		</article>
		
		<!-- Playstation 3 case preview -->
		<article class="ps3 case">
			<div>
				<div class="logo">
					<img src="http://cases.tb-one.se/img/bluray-ps3.png">
					<img src="http://cases.tb-one.se/img/ps3.png">
				</div>
				<div class="img">
					<span><!-- YOUR IMAGE HERE --></span>
				</div>
			</div>
		</article>
		
		<!-- Xbox 360 case preview -->
		<article class="xbox case">
			<div>
				<div class="img">
					<span><!-- YOUR IMAGE HERE --></span>
				</div>
			</div>
		</article>
		
		<!-- CD case preview -->
		<article class="cd case">
			<div>
				<div class="img">
					<span></span>
				</div>
			</div>
		</article>
	</div>
</section>
<section class="shelf">
	<div>
		<!-- Blu ray case preview -->
		<article class="bluray case">
			<div>
        <div class="logo"><img src="http://cases.tb-one.se/img/bluray.png"></div>
				
				<div class="img">
					<span><img src="https://upload.wikimedia.org/wikipedia/en/thumb/6/65/Clerks_movie_poster%3B_Just_because_they_serve_you_---_.jpg/215px-Clerks_movie_poster%3B_Just_because_they_serve_you_---_.jpg"</span>
				</div>
			</div>
		</article>
		
		<!-- Playstation 3 case preview -->
		<article class="ps3 case">
			<div>
				<div class="logo">
					<img src="http://cases.tb-one.se/img/bluray-ps3.png">
					<img src="http://cases.tb-one.se/img/ps3.png">
				</div>
				<div class="img">
					<span><img src="http://upload.wikimedia.org/wikipedia/en/thumb/5/51/FIFA_13_Global_Cover.jpeg/250px-FIFA_13_Global_Cover.jpeg"></span>
				</div>
			</div>
		</article>
		
	<article class="cd case">
			<div>
				<div class="img">
					<span><img src="http://i1.ytimg.com/vi/olAN0gz2HbI/maxresdefault.jpg"></span>
				</div>
			</div>
		</article>
    
		<!-- CD case preview -->
		<article class="cd case">
			<div>
				<div class="img">
					<span><img src="http://www.wxou.org/wp-content/uploads/2013/12/beyonce_album_cover.jpg"></span>
				</div>
			</div>
		</article>
	</div>
</section>
            
          
!
            
              /* Preview styling only
------------------------ */

body {
	background: #fff repeat;
}

article {
	margin: 0 10px;
}

/* The awesome
------------------ */

/* Shelf (Works best in Webkit) */
.shelf {
	position: relative;
	width: 721px;
	border-bottom: 13px solid #24252a;
	text-align: center;
	padding: 0 27px;
  margin: 20px auto;
  background: transparent;
}

.shelf:after {
	position: absolute;
	bottom: -13px;
	left: 34px;
	height: 10px;
	background: transparent;
	content: "";
	-webkit-transform: perspective( 150 ) rotateX( -25deg );
	   -moz-transform: perspective( 150 ) rotateX( -25deg );
	    -ms-transform: perspective( 150 ) rotateX( -25deg );
	        transform: perspective( 150 ) rotateX( -25deg );
	right: 34px;
	box-shadow: 0 0 17px 5px rgba(0, 0, 0, 0.7);
	z-index: -1;
}

	.shelf > div {
		border-bottom: 23px solid #303138;
		position: relative;
		z-index: 1;
	}
	
	.shelf > div:before {
	  content: '';
	  width: 0px;
	  height: 0px;
	  border-style: solid;
	  border-width: 0 0 23px 27px;
	  border-color: transparent transparent #303138 transparent;
	  position: absolute;
	  bottom: -23px;
	  left: -27px;
	  z-index: 2;
	  -webkit-transform:rotate(360deg);
	  -moz-transform:rotate(360deg);
	  transform:rotate(360deg);
	}
	
	.shelf > div:after {
	  content: '';
	  width: 0px;
	  height: 0px;
	  border-style: solid;
	  border-width: 23px 0 0 27px;
	  border-color: transparent transparent transparent #303138;
	  position: absolute;
	  bottom: -23px;
	  right: -27px;
	  z-index: 2;
	}
	
		.shelf > div > * {
			position: relative;
			z-index: 2;
			top: 18px;
		}


/* Default case template (Bluray) */

.case {
	display: inline-block;
	width: 142px;
	height: 179px;
	border-radius: 5px;
	position: relative;
	z-index: 1;
}

.case:after {
	width: 100%;
	height: 10px;
	border-radius: 20px;
	content: "";
	background: rgba(0, 0, 0, 0.3);
	position: absolute;
	bottom: -5px;
	-webkit-transform: perspective(600) rotateX(100deg);
	   -moz-transform: perspective(600) rotateX(100deg);
	    -ms-transform: perspective(600) rotateX(100deg);
	     -o-transform: perspective(600) rotateX(100deg);
	        transform: perspective(600) rotateX(100deg);
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	left: 0;
}

	.case > div {
		width: 100%;
		height: 100%;
		background: #46b0e9;
		background: rgba(70, 176, 233, 0.8);
		border-radius: 8px 8px 5px 5px;
		-webkit-box-sizing: border-box;
		   -moz-box-sizing: border-box;
		        box-sizing: border-box;
		padding: 14px 3px 3px 0;
		overflow: hidden;
		position: relative;
	}
	
	.case > div:after {
		content: "";
		position: absolute;
		top: 0;
		left: 35px;
		width: 100%;
		height: 200%;
		background: rgba(255, 255, 255, 0.2);
		z-index: 10;
		-webkit-transform: rotate(30deg);
		   -moz-transform: rotate(30deg);
		    -ms-transform: rotate(30deg);
		     -o-transform: rotate(30deg);
		        transform: rotate(30deg);
	}
	
		.case > div > .logo {
			position: absolute;
			top: 5px;
			left: 0;
			width: 100%;
		}
		
			.case > div > .logo > img {
				max-height: 8px;
				width: auto;
				margin: auto;
				display: block;
			}
	
		.case > div > .img {
			-webkit-box-sizing: border-box;
			   -moz-box-sizing: border-box;
			        box-sizing: border-box;
			width: 100%;
			height: 100%;
			padding: 1px 1px 1px 0;
			border-radius: 0 4px 4px 0;
			background: rgba(0, 0, 0, 0.2);
			position: relative;
		}
		
		.case > div > .img:before {
			content: "";
			position: absolute;
			top: -10px;
			left: 1px;
			width: 2px;
			bottom: 0;
			background: rgba(255, 255, 255, 0.3);
			border-radius: 8px;
			z-index: 3;
		}
		
		.case > div > .img:after {
			content: "";
			position: absolute;
			top: -13px;
			left: 1px;
			right: -2px;
			height: 15px;
			border-top: 2px solid rgba(255, 255, 255, 0.3);
			border-radius: 8px;
		}
		
			.case > div > .img > span {
				-webkit-box-sizing: border-box;
				   -moz-box-sizing: border-box;
				        box-sizing: border-box;
				width: 100%;
				height: 100%;
				padding: 1px 1px 1px 0;
				border-radius: 0 4px 4px 0;
				background: rgba(255, 255, 255, 0.2);
				display: block;
				position: relative;
			}
			
			.case > div > .img > span:before {
				position: absolute;
				top: 2px;
				left: 0;
				width: 0;
				height: 100%;
				content: "";
				box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.3);
				z-index: 2;
			}
			
			.case > div > .img > span:after {
				position: absolute;
				top: 5px;
				left: 0;
				width: 0;
				height: 100%;
				content: "";
				box-shadow: 0 0 5px 3px rgba(255, 255, 255, 0.3);
				z-index: 1;
			}
			
				.case > div > .img > span > img {
					width: 100%;
					height: 100%;
					display: block;
					border-radius: 0 3px 3px 0;
				}

				
/* PS3 */
.case.ps3 > div {
	background: #fff;
	background: rgba(239, 239, 239, 0.8);
}

	.case.ps3 > div > .logo {
		text-align: left;
		overflow: hidden;
	}
	
		.case.ps3 > div > .logo > img {
			float: left;
			margin-left: 10px;
		}
		
		.case.ps3 > div > .logo > img + img {
			float: right;
			margin-right: 7px;
			max-height: 3px;
			margin-top: 2px;
		}
		
/* XBOX 360 */
.case.xbox {
	height: 203px;
}

.case.xbox > div {
	background: #75bb24;
	background: rgba(117, 187, 36, 0.8);
	padding: 3px 3px 3px 0;
	border-radius: 2px 5px 5px 2px;
}

/* CD */
.case.cd {
	height: 131px;
}

.case.cd > div {
	background: #fff;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 0;
	padding: 1px 1px 1px 13px;
	border: 1px solid rgba(0, 0, 0, 0.6);
}

	.case.cd > div > .img {
		border-radius: 0;
		padding: 0;
		border: 1px solid rgba(0, 0, 0, 0.6);
	}
	
	.case.cd > div > .img:after,
	.case.cd > div > .img > span:before,
	.case.cd > div > .img > span:after {
		display: none;
	}
	
	.case.cd > div > .img:before {
		box-shadow: none;
		width: 12px;
		background-color: #444;
		background-image: -webkit-gradient(linear, 0 0, 100% 0, color-stop(.5, rgba(0, 0, 0, .2)), color-stop(.5, transparent), to(transparent));
		background-image: -webkit-linear-gradient(0deg, rgba(0, 0, 0, .2) 50%, transparent 50%, transparent);
		background-image: -moz-linear-gradient(0deg, rgba(0, 0, 0, .2) 50%, transparent 50%, transparent);
		background-image: -ms-linear-gradient(0deg, rgba(0, 0, 0, .2) 50%, transparent 50%, transparent);
		background-image: -o-linear-gradient(0deg, rgba(0, 0, 0, .2) 50%, transparent 50%, transparent);
		background-image: linear-gradient(0deg, rgba(0, 0, 0, .2) 50%, transparent 50%, transparent);
		border-radius: 0;
		background-size: 2px 100%;
		top: -1px;
		bottom: -1px;
		left: -14px;
	}
	
		.case.cd > div > .img > span {
			background: transparent;
		}
		
			.case.cd > div > .img > span > img {
				border-radius: 0;
			}
            
          
!
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