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

              
                <figure class="snip1402">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample53.jpg" alt="sample53" />
  <figcaption>
    <h3>Jonquil Gibson</h3>
    <p>Weekends don't count unless you spend them doing something completely pointless.</p><a href="#" class="read-more">Read More</a>
  </figcaption>
</figure>
<figure class="snip1402 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample59.jpg" alt="sample59" />
  <figcaption>
    <h3>Burgundy Steve</h3>
    <p>A voice crackles in Calvin's radio: 'Enemy fighters at two o'clock!, 'Roger. What should I do until then?'</p><a href="#" class="read-more">Read More</a>
  </figcaption>
</figure>
<figure class="snip1402"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample67.jpg" alt="sample67" />
  <figcaption>
    <h3>Ingredia Nutrisha</h3>
    <p>The only skills I have the patience to learn are those that have no real application in life. </p><a href="#" class="read-more">Read More</a>
  </figcaption>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,500,800);
.snip1402 {
  font-family: 'Raleway', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 230px;
  max-width: 315px;
  max-height: 220px;
  width: 100%;
  color: #ffffff;
  text-align: left;
  background-color: #07090c;
  font-size: 16px;
}
.snip1402 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}
.snip1402 img {
  max-width: 100%;
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
  backface-visibility: hidden;
}
.snip1402 figcaption {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  -webkit-transform: scale(0.5) translate(0%, -50%);
  transform: scale(0.5) translate(0%, -50%);
  -webkit-transform-origin: 50% 0%;
  -ms-transform-origin: 50% 0%;
  transform-origin: 50% 0%;
  z-index: 1;
  opacity: 0;
  padding: 0 30px;
}
.snip1402 h3,
.snip1402 p {
  line-height: 1.5em;
}
.snip1402 h3 {
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
}
.snip1402 p {
  font-size: 0.8em;
  font-weight: 500;
  margin: 0 0 15px;
}
.snip1402 .read-more {
  border: 2px solid #ffffff;
  padding: 0.5em 1em;
  font-size: 0.8em;
  text-decoration: none;
  color: #ffffff;
  display: inline-block;
}
.snip1402 .read-more:hover {
  background-color: #ffffff;
  color: #000000;
}
.snip1402:hover img,
.snip1402.hover img {
  -webkit-animation: snip1402 0.45s linear;
  animation: snip1402 0.45s linear;
  -webkit-animation-iteration-count: 1;
  animation-iteration-count: 1;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
}
.snip1402:hover figcaption,
.snip1402.hover figcaption {
  -webkit-transform: scale(1) translate(0, -50%);
  transform: scale(1) translate(0, -50%);
  opacity: 1;
  -webkit-transition-delay: 0.35s;
  transition-delay: 0.35s;
}
@-webkit-keyframes snip1402 {
  50% {
    -webkit-transform: scale(0.8) translateY(0%);
    transform: scale(0.8) translateY(0%);
    opacity: 0.5;
  }
  100% {
    -webkit-transform: scale(0.8) translateY(-150%);
    transform: scale(0.8) translateY(-150%);
    opacity: 0.5;
  }
}
@keyframes snip1402 {
  50% {
    -webkit-transform: scale(0.8) translateY(0%);
    transform: scale(0.8) translateY(0%);
    opacity: 0.5;
  }
  100% {
    -webkit-transform: scale(0.8) translateY(-150%);
    transform: scale(0.8) translateY(-150%);
    opacity: 0.5;
  }
}

              
            
!

JS

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

              
            
!
999px

Console