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.

            
              <!-- Jquery Portfolio wall by Mohamed Abo El-Ghranek - fb.com/midoghranek -->

<div id='filter'>
    <button class='all active'>All</button>
    <button class='arts'>Arts</button>
    <button class='sport'>Sports</button>
    <button class='games'>Games</button>
</div>

<!-- Demo images from behance.net -->
<div id='posts'>
    <div class='post sport'><img src='https://i.imgur.com/NjwjzuK.jpg'/>
  	  <div class='post-content'>
		   <h2>Sport title</h2>
	   	<p>This description for demo only and not for reading</p>
		 <a href="#">View more</a>
	    </div>
    </div>
    <div class='post arts'><img src='https://i.imgur.com/hCzZsC5.jpg'/>
  	  <div class='post-content'>
		   <h2>Art title</h2>
	   	<p>This description for demo only and not for reading</p>
		 <a href="#">View more</a>
	    </div>
    </div>
    <div class='post games'><img src='https://i.imgur.com/ksYMf87.jpg'/>
  	  <div class='post-content'>
		   <h2>Games title</h2>
	   	<p>This description for demo only and not for reading</p>
		 <a href="#">View more</a>
	    </div>
    </div>
    <div class='post arts'><img src='https://i.imgur.com/GaObIBE.jpg'/>
  	  <div class='post-content'>
		   <h2>Art title 2</h2>
	   	<p>This description for demo only and not for reading</p>
		 <a href="#">View more</a>
	    </div>
    </div>
    <div class='post sport'><img src='https://i.imgur.com/JDFqCeg.jpg'/>
  	  <div class='post-content'>
		   <h2>Sport title 2</h2>
	   	<p>This description for demo only and not for reading</p>
		 <a href="#">View more</a>
	    </div>
    </div>
    <div class='post games'><img src='https://i.imgur.com/4IiYv9y.jpg'/>
  	  <div class='post-content'>
		   <h2>Games title 2</h2>
	   	<p>This description for demo only and not for reading</p>
		 <a href="#">View more</a>
	    </div>
    </div>
</div>

<div class='hidden'></div>
            
          
!
            
              /* font awesome icons */
@import url("//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css");

/* open sans font */
@import url("//fonts.googleapis.com/css?family=Open+Sans");

* {
  margin:0;
  padding:0;
  outline:0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
body {
  font-family: 'Open Sans', sans-serif;
  background-color: #222;
  color: #FFF;
  font-size: 14px;
  line-height: 20px;
  letter-space: .05px;
}
.hidden {
    display: none;
}
#filter {
  text-align: center;
  background-color: #333;
  padding: 15px;
}
#filter button {
  border: 0;
  background-color: #333;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: #FFF;
  cursor: pointer;
  padding: 5px 20px;
}
#filter button.active {
  background-color: #406174;
}
#filter button:focus {
    outline: 0;
}
#posts {
  max-width: 1200px;
  margin: 0 auto;
}
#posts .post {
  width: 25%;
  float: left;
  height: 250px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  display: inline-block;
  background: #2e5d5a;

}
#posts .post img {
   position: relative;
	display: block;
   width: -webkit-calc(100% + 60px);
	width: calc(100% + 60px);
	opacity: 1;
	-webkit-transition: opacity 0.35s, 
   -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
	-webkit-transform: translate3d(-30px,0,0) scale(1.12);
	transform: translate3d(-30px,0,0) scale(1.12);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	min-height: 100%;
}
#posts .post:hover img {
	opacity: 0.5;
	-webkit-transform: translate3d(0,0,0) scale(1);
	transform: translate3d(0,0,0) scale(1);
}

#posts .post .post-content {
	padding: 2em;
	color: #fff;
	text-transform: uppercase;
	font-size: 1.25em;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
#posts .post .post-content::before,
#posts .post .post-content::after {
	pointer-events: none;
}

#posts .post .post-content,
#posts .post a {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
#posts .post a {
	z-index: 1000;
	text-indent: 200%;
	white-space: nowrap;
	font-size: 0;
	opacity: 0;
}
#posts .post h2 {
	word-spacing: -0.15em;
	font-weight: 300;
	position: absolute;
	right: 0;
	bottom: 0;
	padding: 1em 1.2em;
}
#posts .post h2,
#posts .post p {
	margin: 0;
}
#posts .post p {
	letter-spacing: 1px;
	font-size: 68.5%;
	padding: 0 10px 0 0;
	width: 50%;
	border-right: 1px solid #fff;
	text-align: right;
	opacity: 0;
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
	-webkit-transform: translate3d(-40px,0,0);
	transform: translate3d(-40px,0,0);
}
#posts .post:hover p {
	opacity: 1;
	-webkit-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0);
}


@media screen and (max-width: 600px) {
  #posts .post {
    width: 50%;
  }
}
            
          
!
            
              /* Jquery Portfolio wall by Mohamed Abo El-Ghranek - fb.com/midoghranek no need to plugins */

$(document).ready(function(){

  $('.hidden').css('display','none');

  $( "#filter button" ).each(function() {

    $(this).on("click", function(){

         var filter = $(this).attr('class');         

      if ( $(this).attr('class') == 'all' ) {
         $('.hidden').contents().appendTo('#posts').hide().show('slow');
         $( "#filter button" ).removeClass('active');
         $(this).addClass('active');
         $("#filter button").attr("disabled", false);
         $(this).attr("disabled", true);
      }
      else {
         $('.post').appendTo('.hidden');
         $('.hidden').contents().appendTo('#posts').hide().show('slow');
         $('.post:not(.' + filter + ')').appendTo('.hidden').hide('slow');
         $( "#filter button" ).removeClass('active');
         $(this).addClass('active');
         $("#filter button").attr("disabled", false);
         $(this).attr("disabled", true);
      };
      
      });

  });

});

            
          
!
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