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="snip1247">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample3.jpg" alt="sample3"/>
  <figcaption>
    <h3>Fletch Skinner</h3>
    <div class="icons">
      <a href="#"><i class="ion-social-reddit-outline"></i></a>
      <a href="#"> <i class="ion-social-twitter-outline"></i></a>
      <a href="#"> <i class="ion-social-vimeo-outline"></i></a>
    </div>
  </figcaption>
</figure>
<figure class="snip1247 hover">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample29.jpg" alt="sample29"/>
  <figcaption>
    <h3>Eleanor Fant</h3>
    <div class="icons">
      <a href="#"><i class="ion-social-reddit-outline"></i></a>
      <a href="#"> <i class="ion-social-twitter-outline"></i></a>
      <a href="#"> <i class="ion-social-vimeo-outline"></i></a>
    </div>
  </figcaption>
</figure>
<figure class="snip1247">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample83.jpg" alt="sample83"/>
  <figcaption>
    <h3>Chauffina Carr</h3>
    <div class="icons">
      <a href="#"><i class="ion-social-reddit-outline"></i></a>
      <a href="#"> <i class="ion-social-twitter-outline"></i></a>
      <a href="#"> <i class="ion-social-vimeo-outline"></i></a>
    </div>
  </figcaption>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,800);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
.snip1247 {
  font-family: 'Raleway', Arial, sans-serif;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  width: 100%;
  color: #ffffff;
  text-align: left;
  font-size: 16px;
}
.snip1247 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.25s ease-in;
  transition: all 0.25s ease-in;
}
.snip1247 img {
  opacity: 1;
  max-width: 100%;
  vertical-align: top;
}
.snip1247 figcaption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  padding: 0 20px;
}
.snip1247 figcaption:before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  -webkit-transform: translateY(-100%);
  transform: translateY(-100%);
  background-color: #ffffff;
  -webkit-transition: all 0.25s ease-in;
  transition: all 0.25s ease-in;
  z-index: -1;
}
.snip1247 h3 {
  line-height: 40px;
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
}
.snip1247 .icons {
  position: absolute;
  right: 15px;
  bottom: 0;
}
.snip1247 .icons a {
  display: inline-block;
}
.snip1247 .icons i {
  color: #ffffff;
  line-height: 40px;
  width: 32px;
  font-size: 1.4em;
  padding: 0;
  text-align: center;
  display: inline-block;
  margin: 0;
}
.snip1247 .icons i:hover {
  background-color: #34495e;
  color: #ffffff;
}
.snip1247:hover img,
.snip1247.hover img {
  -webkit-transform: translateY(20px);
  transform: translateY(20px);
}
.snip1247:hover figcaption,
.snip1247.hover figcaption {
  color: #34495e;
}
.snip1247:hover figcaption:before,
.snip1247.hover figcaption:before {
  -webkit-transform: translateY(0);
  transform: translateY(0);
}
.snip1247:hover figcaption i,
.snip1247.hover figcaption i {
  color: #34495e;
}

              
            
!

JS

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

Console