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. 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

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

              
                <div class="grid">
	<div class="gutter-sizer"></div>
	<div class="hover grid-item grid-item--width2 grid-item--height2">
		<div class="black tile front">
			<div class="pad">
				<h2>Gun constructor</h2>
			</div>
		</div>
		<div class="black back">
			<div class="pad">
				<p>Used to create a new databbase instace.</p>
			</div>
		</div>
	</div>
	<div class=" hover grid-item">
		<div class="red tile front">
			<div class "pad">
				<h2>gun.put</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Save data into gun, syncing it with your connected ppers.</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="red tile front">
			<div class "pad">
				<h2>gun.key</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Index your data, so you can find it later, faster.</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="red tile front">
			<div class "pad">
				<h2>gun.get</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Load all data under a key into the context</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="blue tile front">
			<div class "pad">
				<h2>gun.path</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Navigate through a node's properties</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="blue tile front">
			<div class "pad">
				<h2>gun.back</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Move up to the parent context on the chain</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="blue tile front">
			<div class "pad">
				<h2>gun.on</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Subscribe to updates changes on a node or property real-time</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="green tile front">
			<div class "pad">
				<h2>gun.map</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Loop over each property in a node, and susbscribe to future changes. It's essentiall performing a .path on each field.</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="green tile front">
			<div class "pad">
				<h2>gun.val</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Read a full object without subscribing updates</p>
				</div>
			</div>
	</div>
	<div class=" hover grid-item">
		<div class="green tile front">
			<div class "pad">
				<h2>gun.not</h2>
			</div>
		</div>
			<div class="back">
				<div class="pad">
					<p>Handle cases where data can't be found.</p>
				</div>
			</div>
	</div>
</div>
              
            
!

CSS

              
                *{box-sizing:border-box;}

body, html{
	margin:0;
	padding:0;
	font-family:sans-serif;
	color: white;
}

.red{
	background-color: rgb(236,104,89);
}

.blue{
	background-color: rgb(77,121,216);
}

.green{
	background-color: rgb(122,216,133);
}

.black{
	background-color: black;
}

.grid{
	width:100%;
	height:100vh;
	overflow:auto;
	background-color:#484A47;
}

.grid:after {
  content: '';
  display: block;
  clear: both;
}

/* 2 columns for mobile devices */

.grid-item, .grid-sizer{
	width:50%;
	min-width:250px;
	height:30vh;
}

.grid-item{
	float:left;
	height:auto;
	padding:16px;
	position:relative;
	-webkit-perspective:600px;
	-moz-perspective:600px;
}

.front{
	z-index:900;
	width:95%;
	-webkit-transform:rotateX(0deg) rotateY(0deg);
	-moz-transform:rotateX(0deg) rotateY(0deg);
	transform:rotateX(0deg) rotateY(0deg);
	-webkit-transform-style:preserve-3d;
	-moz-transform-style:preserve-3d;
	transform-style:preserve-3d;
	-webkit-backface-visibility:hidden;
	-moz-backface-visibility:hidden;
	backface-visibility:hidden;
	-webkit-transition:all .5s ease-in-out;
	-moz-transition:all .5s ease-in-out;
	-ms-transition:all .5s ease-in-out;
	-o-transition:all .5s ease-in-out;
	transition:all .5s ease-in-out;
}

.grid-item .front h2{
	position: absolute;
	top:20px;
}

.grid-item.flip .front{
	z-index:900;
	-webkit-transform:rotateY(180deg);
	-moz-transform:rotateY(180deg);
}

.back{
	z-index:800;
	width:95%;
	height:30vh;
	position:absolute;
	top:0;
	-webkit-transform: rotateY(-180deg);
	-moz-transform: rotateY(-180deg);
	transform: rotateY(-180deg);
	-webkit-transform-style:preserve-3d;
	-moz-transform-style:preserve-3d;
	transform-style:preserve-3d;
	-webkit-backface-visibility:hidden;
	-moz-backface-visibility:hidden;
	backface-visibility:hidden;
	-webkit-transition:all .5s ease-in-out;
	-moz-transition:all .5s ease-in-out;
	-ms-transition:all .5s ease-in-out;
	-o-transition:all .5s ease-in-out;
	transition:all .5s ease-in-out;
}

.grid-item .back p{
	position:absolute;
	top:10px;
}

.grid-item.flip .back{
	z-index:1000;
	-webkit-transform:rotateY(0deg);
	-moz-transform:rotateY(0deg);
}

.gutter-sizer{ width:0; }

.tile{
	height:30vh;
	padding:16px;
}

@media(min-width:341px){
	.grid-item{
		width:25%;
		min-width:275px;
	}
	
	.grid-item--width2{
		width:50%;
		min-width:500px;
	}
	
	.grid-item--height2{
		height:67.2vh;
	}
}


              
            
!

JS

              
                $('.grid').isotope({
  layoutMode: 'packery',
  itemSelector: '.grid-item',
  percentPosition: true,
  packery: {
    gutter: '.gutter-sizer'
  }
});

$('.hover').hover(function(){
	$(this).toggleClass('flip');
});
              
            
!
999px

Console