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="snip1343">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample30.jpg" alt="sq-sample30" />
  <h3>Max Conversion</h3>
  <figcaption>
    <p>Weekends don't count unless you spend them doing something completely pointless. </p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1343 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample31.jpg" alt="sq-sample31" />
  <h3>Jason Response</h3>
  <figcaption>
    <p>Sometimes one should just look at things and think about things without doing things. </p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1343"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample35.jpg" alt="sq-sample35" />
  <h3>Parsley Montana</h3>
  <figcaption>
    <p>My family is dysfunctional and my parents won't empower me. Consequently I'm not self actualized.</p>
  </figcaption>
  <a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto:300,400);
.snip1343 {
  font-family: 'Roboto', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  color: #ffffff;
  line-height: 1.4em;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.snip1343 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
}
.snip1343 img {
  opacity: 1;
  width: 100%;
  vertical-align: top;
}
.snip1343 h3 {
  position: absolute;
  top: 0%;
  width: 100%;
  background-color: #1e1e1e;
  z-index: 1;
  text-align: right;
  padding: 15px 25px 0px;
  margin: 0;
  font-weight: 300;
  font-size: 1.3em;
  -webkit-transform: translateY(-100%);
  transform: translateY(-100%);
}
.snip1343 h3:before {
  position: absolute;
  content: '';
  top: 100%;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 315px 55px 0;
  border-color: transparent #1e1e1e transparent transparent;
}
.snip1343 figcaption {
  padding: 5px 25px 25px;
  position: absolute;
  width: 100%;
  z-index: 2;
  bottom: 0%;
  background-color: #141414;
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
}
.snip1343 figcaption:before {
  position: absolute;
  content: '';
  bottom: 100%;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 55px 0 0 315px;
  border-color: transparent transparent transparent #141414;
}
.snip1343 p {
  margin: 0;
  padding: 0;
  font-size: 0.8em;
  letter-spacing: 1px;
  opacity: 0.8;
}
.snip1343 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 2;
}
.snip1343:hover h3,
.snip1343.hover h3,
.snip1343:hover figcaption,
.snip1343.hover figcaption {
  -webkit-transform: translateY(0%);
  transform: translateY(0%);
}

              
            
!

JS

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

              
            
!
999px

Console