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="snip0061 red">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample6.jpg" alt="sample6" />
  <figcaption>
    <h2>Lindsay <span>Holland</span></h2>
    <p>Some things don't need the thought people give them.</p>
    <div class="icons"><a href="#"><i class="ion-ios-home"></i></a><a href="#"><i class="ion-email-unread"></i></a><a href="#"><i class="ion-ios-star"></i></a></div>
  </figcaption>
  <div class="position">Illustrator</div>
</figure>
<figure class="snip0061 green hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample5.jpg" alt="sample5" />
  <figcaption>
    <h2>Shelly <span>Collins</span></h2>
    <p>There's never enough time to do all the nothing you want.</p>
    <div class="icons"><a href="#"><i class="ion-ios-home"></i></a><a href="#"><i class="ion-ios-email"></i></a><a href="#"><i class="ion-ios-telephone"></i></a></div>
  </figcaption>
  <div class="position">Software Engineer</div>
</figure>
<figure class="snip0061 yellow"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample8.jpg" alt="sample8" />
  <figcaption>
    <h2>Sandra<span>Ward</span></h2>
    <p>It's great to have a friend who appreciates an earnest discussion of ideas.</p>
    <div class="icons"><a href="#"><i class="ion-ios-home"></i></a><a href="#"><i class="ion-ios-email"></i></a><a href="#"><i class="ion-ios-telephone"></i></a></div>
  </figcaption>
  <div class="position">Software Engineer</div>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,500,800);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
figure.snip0061 {
  font-family: 'Raleway', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  width: 100%;
  background: #ffffff;
  color: #000000;
}
figure.snip0061 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s ease-in-out;
  transition: all 0.35s ease-in-out;
}
figure.snip0061 img {
  max-width: 100%;
  position: relative;
  display: block;
}
figure.snip0061:before {
  position: absolute;
  content: '';
  height: 120%;
  width: 150%;
  z-index: 1;
  top: -60%;
  left: -60%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #fff;
  border-radius: 50%;
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
  -webkit-transform: skewX(-30deg) translateX(-20%);
  transform: skewX(-30deg) translateX(-20%);
  -webkit-box-shadow: 2px 0px 10px rgba(0, 0, 0, 0.5);
  box-shadow: 2px 0px 10px rgba(0, 0, 0, 0.5);
}
figure.snip0061 figcaption {
  padding-left: 30px;
  position: absolute;
  left: 0;
  top: 30px;
  width: 60%;
  z-index: 1;
  opacity: 0;
}
figure.snip0061 figcaption h2,
figure.snip0061 figcaption p {
  margin: 0;
  text-align: left;
  padding: 5px 0 0;
  width: 100%;
}
figure.snip0061 figcaption h2 {
  font-size: 1.4em;
  font-weight: 300;
  text-transform: uppercase;
}
figure.snip0061 figcaption h2 span {
  font-weight: 800;
}
figure.snip0061 figcaption p {
  font-weight: 500;
  font-size: 0.9em;
  opacity: 0.8;
}
figure.snip0061 figcaption .icons {
  width: 100%;
  padding: 8px 0;
}
figure.snip0061 figcaption .icons i {
  display: inline-block;
  font-size: 20px;
  background: #000000;
  color: #ffffff;
  opacity: 0;
  margin-right: 5px;
  height: 35px;
  width: 35px;
  text-align: center;
  line-height: 35px;
  border-radius: 50%;
}
figure.snip0061 figcaption a {
  opacity: 0.7;
}
figure.snip0061 figcaption a:hover {
  opacity: 1;
}
figure.snip0061 .position {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: right;
  padding: 15px 30px;
  font-size: 0.9em;
  opacity: 1;
  font-weight: 500;
  color: #ffffff;
  background: #000000;
}
figure.snip0061.blue .icons i {
  background: #164666;
}
figure.snip0061.blue .position {
  background: #20638f;
}
figure.snip0061.red .icons i {
  background: #6d2018;
}
figure.snip0061.red .position {
  background: #962d22;
}
figure.snip0061.yellow .icons i {
  background: #924d10;
}
figure.snip0061.yellow .position {
  background: #bf6516;
}
figure.snip0061.green .icons i {
  background: #145b32;
}
figure.snip0061.green .position {
  background: #1e8449;
}
figure.snip0061:hover figcaption,
figure.snip0061.hover figcaption,
figure.snip0061:hover .icons i,
figure.snip0061.hover .icons i {
  opacity: 1;
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
}
figure.snip0061:hover:before,
figure.snip0061.hover:before {
  -webkit-transform: skewX(0deg) translateX(0px);
  transform: skewX(0deg) translateX(0px);
}


/* 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 */
  $("figure").mouseleave(
    function() {
      $(this).removeClass("hover");
    }
  );
              
            
!
999px

Console