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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!-- first page of tiles --> 
<!-- three rows in full page -->
<div class="three rows" id="first-page">
  <!-- three tiles per row -->
  <div class="three cols">
    <!-- tile plus some schmancyness -->
    <div class="schmancy tile pic0">
      <!-- tile content -->
      <div class="content"> Fancy. </div>
    </div>
    <!-- and so on... -->
    <div class="schmancy tile pic3">
      <div class="content"> Stuff. </div>
    </div>
    <div class="schmancy tile pic1">
      <div class="content"> Fancy. </div>
    </div>
  </div>
  <div class="four cols">
    <div class="schmancy tile pic2">
      <div class="content"> This. </div>
    </div>
    <div class="schmancy tile pic1">
      <div class="content"> Is. </div>
    </div>
    <div class="schmancy tile pic2">
      <div class="content"> This. </div>
    </div>
    <div class="schmancy tile pic1">
      <div class="content"> Is. </div>
    </div>
  </div> 
  <div class="three cols">
    <div class="schmancy tile pic0">
      <div class="content"> Fancy. </div>
    </div>
    <div class="schmancy tile pic3">
      <div class="content"> Stuff. </div>
    </div>
    <div class="schmancy tile pic1">
      <div class="content"> Fancy. </div>
    </div>
  </div>
</div>

<!-- second page of tiles --> 
<div class="two rows" id="second-page">
  <div class="three cols ">
    <div class="schmancy tile  pic0">
      <div class="content"> Fancy. </div>
    </div>
    <div class="schmancy tile  pic3">
      <div class="content"> Stuff. </div>
    </div>
    <div class="schmancy tile  pic1">
      <div class="content"> Fancy. </div>
    </div>
  </div>
  <div class="three cols">
    <div class="schmancy tile  pic0">
      <div class="content"> Fancy. </div>
    </div>
    <div class="schmancy tile  pic3">
      <div class="content"> Stuff. </div>
    </div>
    <div class="schmancy tile  pic1">
      <div class="content"> Fancy. </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                /****************************/


/* setting up the full page */

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
}


/*************************/


/* layout of the columns */

.cols {
  width: 100%;
  clear: both;
}

.cols .tile {
  height: 100%;
  float: left;
  overflow: hidden;
}


/* two columns layout */

.cols.two .tile {
  width: 50%;
}


/* three columns layout */

.cols.three .tile {
  width: 33%;
}

.cols.three .tile:last-of-type {
  width: 34%;
}


/* four columns layout */

.cols.four .tile {
  width: 25%;
}


/**********************/


/* layout of the rows */

.rows {
  height: 100%;
}


/* two rows layout */

.rows.two .cols {
  height: 50%;
}


/* three rows layout */

.rows.three .cols {
  height: 33%;
}

.rows.three .cols:last-of-type {
  height: 34%;
}


/* four rows layout */

.rows.four .cols {
  height: 25%;
}


/*****************************************/


/* some background images and decoration */

.cols .tile {
  opacity: 0.4;
  background-size: cover;
}

.rows {
  background: black;
}

.cols .tile.schmancy {
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

.cols .tile.schmancy.pic0 {
  background-image: url("http://pipsum.com/850x600.jpg");
}

.cols .tile.schmancy.pic1 {
  background-image: url("http://pipsum.com/800x600.jpg");
}

.cols .tile.schmancy.pic2 {
  background-image: url("http://pipsum.com/800x650.jpg");
}

.cols .tile.schmancy.pic3 {
  background-image: url("http://pipsum.com/800x550.jpg");
}


/************************************/


/* typography and content of a tile */

.tile .content {
  position: relative;
  top: 50%;
  left: 50%;
  width: 50%;
  margin-left: -25%;
}

.tile {
  font-family: Helvetica;
  color: white;
  align: center;
}


/************************/


/* animate mouse effect */

.cols .tile {
  transition: 1s;
}

.cols .tile:hover {
  opacity: 1;
  font-size: 10em;
}

.cols.two:hover .tile {
  width: 20%;
}

.cols.two:hover .tile:hover {
  width: 80%;
}

.cols.three:hover .tile {
  width: 20%;
}

.cols.three:hover .tile:hover {
  width: 60%;
}

.cols.four:hover .tile {
  width: 20%;
}

.cols.four:hover .tile:hover {
  width: 40%;
}

.rows .cols {
  transition: 1s;
}

.rows.two:hover .cols {
  height: 20%;
}

.rows.two:hover .cols:hover {
  height: 80%;
}

.rows.three:hover .cols {
  height: 20%;
}

.rows.three:hover .cols:hover {
  height: 60%;
}

.rows.four:hover .cols {
  height: 20%;
}

.rows.four:hover .cols:hover {
  height: 40%;
}
              
            
!

JS

              
                
              
            
!
999px

Console