cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

              <h1>3D iframe-based previews</h1>
<h2>Based on <a href="http://thecodeplayer.com/walkthrough/perspective-mockups-css3-3d-transforms">Perspective Mobile App Mockups</a></h2>
<ul class="grid">
  <li class="one"><iframe src="http://thing.io" width="320" height="568"></iframe><span class="s"></span></li>
	<li class="two"><iframe src="https://solidstuff.co.za/" width="320" height="568"></iframe><span class="s"></span></li>
	<li class="three"><iframe src="http://m.wikipedia.org/" width="320" height="568"></iframe><span class="s"></span></li>
	<li class="four"><iframe src="http://thecodeplayer.com/" width="320" height="568"></iframe><span class="s"></span></li>
              /*Custom Font*/
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300);

/*Basic Reset*/
* {margin: 0; padding: 0;}

body {
	background: #333;
	/*Removing scrollers*/
	overflow: hidden;
	/*A high perspective to give the UL an isometric look*/
	perspective: 3000;

h1,h2 {
	color: white;
	font: 45px 'Open Sans';
	width: 500px;
	padding: 50px;
h1 {
  padding-bottom: 0;
h2 {
  font: 16px 'Open Sans';
  padding-top: 10px;

a {
  color: #fff;

.grid {
	position: absolute; top: 100px; left: 0;
	/*Width = (225 + 20 + 20) * 4 = 1060*/
	width: 1060px;
	/*3D Transform*/
	transform: rotateX(60deg) rotateZ(-50deg);
	/*Preserve 3D style for children*/
	transform-style: preserve-3d;
.grid li {
	height: 400px; width: 225px;
	float: left; margin: 20px;
	list-style-type: none;
	/*Hide the lighting gradient from the front face*/
	background-size: 0, cover;
	/*Preserve 3D style for children(pseudo elements)*/
	transform-style: preserve-3d;
/*Left and Bottom Sides*/
.grid li:before, .grid li:after {
	content: '';
	position: absolute;
	/*100% height and width*/
	top: 0; left: 0; right: 0; bottom: 0;
	background: inherit;
	background-size: cover;
/*Left Side*/
.grid li:before {
	transform-origin: left center;
	transform: rotateY(90deg);
	/*Reducing the width of the left side for a flat feel*/
	width: 5px;
/*Bottom Side*/
.grid li:after {
	transform-origin: bottom center;
	transform: rotateX(90deg);
	/*Reducing the height*/
	height: 5px; top: auto; bottom: 0;
	/*Background fix - start the background from the bottom*/
	background-position: bottom center;
/*Shadow time - sadly all pseudo elements are used so we will have to add an HTML element in each LI*/
.s {
	position: absolute;
	/*30px smaller from each side*/
	top: 30px; left: 30px; right: 30px; bottom: 30px;
	background: rgba(0, 0, 0, 0.5);
	box-shadow: 0 0 30px 30px rgba(0, 0, 0, 0.5);
	/*Pushing down the shadow to give an elevated feel*/
	transform: translateZ(-50px);

/*We will add a light gradient to the sides to give some lighting effect*/
.one {
		linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)); 
/*		url("http://thecodeplayer.com/uploads/media/m1.png");*/
.two {
		linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
.three {
		linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)); 
	/*	url("http://thecodeplayer.com/uploads/media/m3.png");*/
.four {
		linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)); 
	/*	url("http://thecodeplayer.com/uploads/media/m4.png");*/

iframe {
  border: none;
  transform: scale(0.703125);
  transform-origin: 0 0;
  background-color: #fff;

Loading ..................