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

              
                <div class="masonry-layout">
    <div class="masonry-layout__panel masonry-layout__panel--flipper-container masonry-layout__panel--medium">
      <div class="masonry-layout__panel-content--flipper"><img src="http://lorempixel.com/400/200/" class="masonry-layout__panel-content--img masonry-layout__panel-content--front"/>
        <div class="masonry-layout__panel-content--back bg--green">
          <p>Here is a flipped image...</p>
        </div>
      </div>
    </div>
    <div class="masonry-layout__panel">
      <div class="masonry-layout__panel-content tx--white bg--green">
        <h1>Here is a masonry layout.</h1>
      </div>
    </div>
    <div class="masonry-layout__panel masonry-layout__panel--cluster masonry-layout__panel--horizontal masonry-layout__panel--medium">
      <div class="masonry-layout__panel masonry-layout__panel--segment masonry-layout__panel--full-size"><img src="http://lorempixel.com/400/200/" class="masonry-layout__panel-content masonry-layout__panel-content--img"/></div>
      <div class="masonry-layout__panel masonry-layout__panel--segment masonry-layout__panel--quarter-size"><img src="http://lorempixel.com/400/200/" class="masonry-layout__panel-content masonry-layout__panel-content--img"/></div>
      <div class="masonry-layout__panel masonry-layout__panel--segment">
        <div class="masonry-layout__panel-content bg--red tx--white">
          <p>Some cool pics.</p>
        </div>
      </div>
    </div>
    <div class="masonry-layout__panel">
      <div class="masonry-layout__panel-content tx--white bg--purple">
        <h3>That's pretty cool, thanks for showing me.</h3>
      </div>
    </div>
    <div class="masonry-layout__panel masonry-layout__panel--cluster masonry-layout__panel--vertical masonry-layout__panel--large">
      <div class="masonry-layout__panel masonry-layout__panel--segment masonry-layout__panel--full-size"><img src="http://lorempixel.com/200/400/" class="masonry-layout__panel-content masonry-layout__panel-content--img"/></div>
      <div class="masonry-layout__panel masonry-layout__panel--segment masonry-layout__panel--quarter-size">
        <div class="masonry-layout__panel-content bg--blue tx--white">
          <p>Hello, I am a paragraph.</p>
        </div>
      </div>
      <div class="masonry-layout__panel masonry-layout__panel--segment">
        <div class="masonry-layout__panel-content bg--blue tx--white"><a>Click here to find out more.</a></div>
      </div>
    </div>
    <div class="masonry-layout__panel">
      <div class="masonry-layout__panel-content tx--white bg--red">
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eu justo ex. Praesent mollis augue sagittis eros pharetra feugiat. Phasellus dignissim est lacus. Sed nec imperdiet dolor, sit amet mattis ex. Sed sed augue eu neque tristique commodo. Mauris aliquet tortor sollicitudin nibh molestie, id egestas nisl sollicitudin. Aliquam erat volutpat. Donec quis ultrices ligula. Cras sed purus risus. Curabitur quis eros eu tortor semper eleifend. Pellentesque lorem elit, dignissim interdum massa id, malesuada rutrum ligula. Suspendisse tempor quis mauris eu facilisis. Phasellus non volutpat diam, non dapibus ligula. Ut non molestie ex, nec sagittis mi. Curabitur suscipit tellus id dolor pretium blandit. Cras tristique tristique pharetra.</p>
      </div>
    </div>
    <div class="masonry-layout__panel">
      <div class="masonry-layout__panel-content tx--white bg--green">
        <h2>Some post about something</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eu justo ex. Praesent mollis augue sagittis eros pharetra feugiat. Phasellus dignissim est lacus. Sed nec imperdiet dolor, sit amet mattis ex. Sed sed augue eu neque tristique commodo. Mauris aliquet tortor sollicitudin nibh molestie, id egestas nisl sollicitudin. Aliquam erat volutpat. Donec quis ultrices ligula. Cras sed purus risus. Curabitur quis eros eu tortor semper eleifend.</p>
      </div>
    </div>
    <div class="masonry-layout__panel"><img src="http://lorempixel.com/400/200/" class="masonry-layout__panel-content masonry-layout__panel-content--img"/></div>
  </div>

              
            
!

CSS

              
                *,*:before,*:after{-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	box-sizing:border-box;}  
	
html { -webkit-font-smoothing: antialiased; 
	-moz-osx-font-smoothing: grayscale; 
	text-rendering: optimizeLegibility; 
	 font-feature-settings: "liga", "kern";
	font-size: 100%;
	}
html * {
    -moz-osx-font-smoothing: grayscale;
      font-family: sans-serif; /* 1 */
  -ms-text-size-adjust: 100%; /* 2 */
  -webkit-text-size-adjust: 100%; /* 2 */
}
body, html{
    height: 100%;
}
body{color: #333;}
/**
 * 1. Correct `inline-block` display not defined in IE 8/9.
 * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
 */

audio,
canvas,
progress,
video {
  display: inline-block; /* 1 */
  vertical-align: baseline; /* 2 */
}
article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
body {padding: 1em;font-family: "Open Sans", sans-serif;}
a{ text-decoration: none;}
li{display:inherit;}
/*mes css*/
.masonry-layout {
  box-sizing: border-box;
  -webkit-column-count: 1;
     -moz-column-count: 1;
          column-count: 1;
  -webkit-column-gap: 0;
     -moz-column-gap: 0;
          column-gap: 0;
}
.masonry-layout * {
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .masonry-layout {
    -webkit-column-count: 2;
       -moz-column-count: 2;
            column-count: 2;
  }
}
@media (min-width: 1200px) {
  .masonry-layout {
    -webkit-column-count: 3;
       -moz-column-count: 3;
            column-count: 3;
  }
}
.masonry-layout__panel-content {
  padding: 10px;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}
.masonry-layout__panel-content--img {
  max-width: 100%;
  padding: 0;
}
.masonry-layout__panel-content--flipper {
  position: relative;
  overflow: visible;
  height: 100%;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
  -webkit-transition: 0.25s;
          transition: 0.25s;
}
.masonry-layout__panel-content--front,
.masonry-layout__panel-content--back {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}
.masonry-layout__panel-content--front {
  z-index: 2;
  -webkit-transform: rotateY(0deg);
          transform: rotateY(0deg);
}
.masonry-layout__panel-content--back {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
}
.masonry-layout__panel {
  padding: 5px;
}
@media (min-width: 768px) {
  .masonry-layout__panel {
    -webkit-column-break-inside: avoid;
       page-break-inside: avoid;
            break-inside: avoid;
  }
}
.masonry-layout__panel--flipper-container {
  -webkit-perspective: 1000;
          perspective: 1000;
}
.masonry-layout__panel--flipper-container:hover .masonry-layout__panel-content--flipper {
  -webkit-transform: rotateY(180deg);
          transform: rotateY(180deg);
}
.masonry-layout__panel--small {
  height: 200px;
}
.masonry-layout__panel--medium {
  height: 300px;
}
.masonry-layout__panel--large {
  height: 400px;
}
@media (max-width: 768px) {
  .masonry-layout__panel--small,
  .masonry-layout__panel--medium,
  .masonry-layout__panel--large {
    overflow: hidden;
    height: auto;
  }
}
.masonry-layout__panel--cluster {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  padding: 0;
  -webkit-flex-wrap: wrap;
      -ms-flex-wrap: wrap;
          flex-wrap: wrap;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
      -ms-flex-direction: row;
          flex-direction: row;
}
.masonry-layout__panel--segment {
  display: block;
  width: 100%;
  height: auto;
}
@media (min-width: 768px) {
  .masonry-layout__panel--segment {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
        -ms-flex: 1;
            flex: 1;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
  }
}
@media (min-width: 768px) {
  .masonry-layout__panel--full-size {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 100%;
        -ms-flex: 0 0 100%;
            flex: 0 0 100%;
    width: 100%;
    height: 100%;
  }
  .masonry-layout__panel--half-size {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 50%;
        -ms-flex: 0 0 50%;
            flex: 0 0 50%;
    width: 50%;
    height: 50%;
  }
  .masonry-layout__panel--quarter-size {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 25%;
        -ms-flex: 0 0 25%;
            flex: 0 0 25%;
    width: 25%;
    height: 25%;
  }
}
@media (min-width: 768px) {
  .masonry-layout__panel--vertical {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
  }
  .masonry-layout__panel--vertical .masonry-layout__panel--segment {
    width: 50%;
  }
  .masonry-layout__panel--horizontal .masonry-layout__panel--segment {
    height: 50%;
  }
}


/**
  * Theming
*/
img {
  background-color: #Fb9f3b;
}
.tx--white {
  color: #fff;
}
.bg--red {
  background-color: #e74c3c;
}
.bg--green {
  background-color: #26a65b;
}
.bg--purple {
  background-color: #8e44ad;
}
.bg--blue {
  background-color: #1e8bc3;
}


              
            
!

JS

              
                
              
            
!
999px

Console