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="snip1463"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample49.jpg" alt="sample49"/>
  <figcaption>
    <h2>Max Conversion</h2>
    <p>My family is dysfunctional and my parents won't empower me. Consequently I'm not self actualized.</p>
    <div class="icons"><a href="#"><i class="ion-chatbubbles"></i></a><a href="#"> <i class="ion-person-add"></i></a><a href="#"> <i class="ion-heart"></i></a></div>
  </figcaption>
</figure>
<figure class="snip1463 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample35.jpg" alt="sample35"/>
  <figcaption>
    <h2>Will Barrow</h2>
    <p>You know what we need, Hobbes? We need an attitude. Yeah, you can't be cool if you don't have an attitude.</p>
    <div class="icons"><a href="#"><i class="ion-chatbubbles"></i></a><a href="#"> <i class="ion-person-add"></i></a><a href="#"> <i class="ion-heart"></i></a></div>
  </figcaption>
</figure>
<figure class="snip1463"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample63.jpg" alt="sample63"/>
  <figcaption>
    <h2>Eleanor Lost</h2>
    <p>That's the problem with nature, something's always stinging you or oozing mucous all over you.</p>
    <div class="icons"><a href="#"><i class="ion-chatbubbles"></i></a><a href="#"> <i class="ion-person-add"></i></a><a href="#"> <i class="ion-heart"></i></a></div>
  </figcaption>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,500,900);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
.snip1463 {
  font-family: 'Source Sans Pro', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 230px;
  max-width: 315px;
  max-height: 230px;
  width: 100%;
  color: #ffffff;
  text-align: center;
  font-size: 16px;
}
.snip1463 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease;
  transition: all 0.35s ease;
}
.snip1463 img {
  opacity: 1;
  width: 100%;
}
.snip1463:after,
.snip1463:before,
.snip1463 figcaption:after,
.snip1463 figcaption:before {
  background: #0a0a0a;
  width: 25%;
  position: absolute;
  content: '';
  opacity: 0;
  -webkit-transition: all 0.3s steps(4);
  transition: all 0.3s steps(4);
  z-index: 1;
  bottom: 100%;
  top: 0;
}
.snip1463:before {
  left: 0;
  -webkit-transition-delay: 0;
  transition-delay: 0;
}
.snip1463:after {
  left: 25%;
  -webkit-transition-delay: 0.1s;
  transition-delay: 0.1s;
}
.snip1463 figcaption:before {
  left: 50%;
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
  z-index: -1;
}
.snip1463 figcaption:after {
  left: 75%;
  -webkit-transition-delay: 0.3s;
  transition-delay: 0.3s;
  z-index: -1;
}
.snip1463 figcaption {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 30px;
}
.snip1463 h2,
.snip1463 p,
.snip1463 .icons {
  margin: 0;
  width: 100%;
  opacity: 0;
}
.snip1463 h2 {
  font-weight: 900;
  text-transform: uppercase;
}
.snip1463 p {
  font-weight: 300;
}
.snip1463 .icons {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
}
.snip1463 i {
  padding: 0px 10px;
  display: inline-block;
  font-size: 24px;
  color: #ffffff;
  text-align: center;
  opacity: 0.8;
}
.snip1463 i:hover {
  opacity: 1;
}
.snip1463:hover:after,
.snip1463.hover:after,
.snip1463:hover:before,
.snip1463.hover:before,
.snip1463:hover figcaption:after,
.snip1463.hover figcaption:after,
.snip1463:hover figcaption:before,
.snip1463.hover figcaption:before {
  bottom: 0;
  opacity: 0.8;
}
.snip1463:hover figcaption h2,
.snip1463.hover figcaption h2,
.snip1463:hover figcaption p,
.snip1463.hover figcaption p,
.snip1463:hover figcaption .icons,
.snip1463.hover figcaption .icons {
  -webkit-transition-delay: 0.4s;
  transition-delay: 0.4s;
}
.snip1463:hover figcaption h2,
.snip1463.hover figcaption h2,
.snip1463:hover figcaption .icons,
.snip1463.hover figcaption .icons {
  opacity: 1;
}
.snip1463:hover figcaption p,
.snip1463.hover figcaption p {
  opacity: 0.7;
}
              
            
!

JS

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

              
            
!
999px

Console