Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <figure class="snip1137">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample14.jpg" alt="sample14" />
  <div class="icons">
    <a href="#"><i class="ion-ios-location-outline"></i></a>
    <a href="#"> <i class="ion-ios-camera-outline"></i></a>
    <a href="#"> <i class="ion-ios-star-outline"></i></a>
  </div>
  <figcaption>
    <h3>Quiche<span> Hollandaise</span></h3>
    <p>
      Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.
    </p>
  </figcaption>
</figure>
<figure class="snip1137 blue hover">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample25.jpg" alt="sample25" />
  <div class="icons">
    <a href="#"><i class="ion-ios-location-outline"></i></a>
    <a href="#"> <i class="ion-ios-camera-outline"></i></a>
    <a href="#"> <i class="ion-ios-star-outline"></i></a>
  </div>
  <figcaption>
    <h3>Caspian<span> Bellevedere</span></h3>
    <p>
      I don't need to compromise on my principles, because they don't have the slightest bearing on what happens to me anyway.
    </p>
  </figcaption>
</figure>
<figure class="snip1137 orange">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample19.jpg" alt="sample19" />
  <div class="icons">
    <a href="#"><i class="ion-ios-location-outline"></i></a>
    <a href="#"> <i class="ion-ios-camera-outline"></i></a>
    <a href="#"> <i class="ion-ios-star-outline"></i></a>
  </div>
  <figcaption>
    <h3>Parsley<span> Montana</span></h3>
    <p>
      Know what I pray for? The strength to change what I can, the inability to accept what I can't and the incapacity to tell the difference.
    </p>
  </figcaption>
</figure>
              
            
!

CSS

              
                /* Included color classes.. 
	.red 
	.blue 
	.yellow
	.green
	.orange
	.navy 
*/
/* Icon set - http://ionicons.com/ */
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
@import url(https://fonts.googleapis.com/css?family=Raleway:400,800);
figure.snip1137 {
  font-family: 'Raleway', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  width: 100%;
  background: #000000;
  color: #333;
  text-align: left;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
figure.snip1137 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  transition: all 0.35s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
figure.snip1137 img {
  max-width: 100%;
}
figure.snip1137 figcaption {
  position: relative;
  background-color: #ffffff;
  padding: 25px;
}
figure.snip1137 h3 {
  text-transform: uppercase;
  margin: 0 0 15px;
  font-weight: 400;
}
figure.snip1137 h3 span {
  font-weight: 800;
}
figure.snip1137 p {
  font-size: 0.8em;
  font-weight: 500;
  text-align: left;
  margin: 0;
  line-height: 1.6em;
}
figure.snip1137 .icons {
  position: absolute;
  top: 25px;
  left: 25px;
}
figure.snip1137 i {
  margin-right: 5px;
  display: inline-block;
  font-size: 28px;
  color: #000000;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: white;
  opacity: 0;
  -webkit-transform: rotateX(90deg);
  transform: rotateX(90deg);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}
figure.snip1137 a {
  opacity: 0.8;
}
figure.snip1137 a:hover {
  opacity: 1;
}
figure.snip1137.blue {
  background-color: #2472a4;
}
figure.snip1137.blue i {
  color: #20638f;
}
figure.snip1137.red {
  background-color: #ab3326;
}
figure.snip1137.red i {
  color: #962d22;
}
figure.snip1137.yellow {
  background-color: #e08e0b;
}
figure.snip1137.yellow i {
  color: #c87f0a;
}
figure.snip1137.green {
  background-color: #229955;
}
figure.snip1137.green i {
  color: #1e8449;
}
figure.snip1137.orange {
  background-color: #d67118;
}
figure.snip1137.orange i {
  color: #bf6516;
}
figure.snip1137.navy {
  background-color: #2b3c4e;
}
figure.snip1137.navy i {
  color: #222f3d;
}
figure.snip1137:hover img,
figure.snip1137.hover img {
  opacity: 0.3;
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}
figure.snip1137:hover i,
figure.snip1137.hover i {
  opacity: 1;
  -webkit-transform: rotateX(0);
  transform: rotateX(0);
}
figure.snip1137:hover a:first-child i,
figure.snip1137.hover a:first-child i {
  -webkit-transition-delay: 0.1s;
  transition-delay: 0.1s;
}
figure.snip1137:hover a:nth-child(2) i,
figure.snip1137.hover a:nth-child(2) i {
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
}
figure.snip1137:hover a:nth-child(3) i,
figure.snip1137.hover a:nth-child(3) i {
  -webkit-transition-delay: 0.3s;
  transition-delay: 0.3s;
}


/* Demo purposes only */
html {
  height: 100%;
}
body {
  background-color: #212121;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: wrap;
  margin: 0;
  height: 100%;
}
              
            
!

JS

              
                  /* Demo purposes only */
  $(".hover").mouseleave(
    function () {
      $(this).removeClass("hover");
    }
  );
              
            
!
999px

Console