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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="snip1100 red">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample5.jpg" alt="sample5" />
  <figcaption>
    <div>
      <h3>Irvin  <span> Casey</span></h3>
      <p>You know what we need, Hobbes? We need an attitude. Yeah, you can't be cool if you.</p>
    </div>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1100 blue hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample6.jpg" alt="sample6" />
  <figcaption>
    <div>
      <h3>Lorena   <span> Mendez</span></h3>
      <p>You know what we need, Hobbes? We need an attitude. Yeah, you can't be cool if you.</p>
    </div>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1100 yellow"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample7.jpg" alt="sample7" />
  <figcaption>
    <div>
      <h3>Katie   <span> Rogers</span></h3>
      <p>You know what we need, Hobbes? We need an attitude. Yeah, you can't be cool if you.</p>
    </div>
  </figcaption>
  <a href="#"></a>
</figure>
              
            
!

CSS

              
                /* Included color classes 
.blue
.red
.yellow
*/

@import url(https://fonts.googleapis.com/css?family=Raleway:400,500,800);
figure.snip1100 {
  font-family: 'Raleway', Arial, sans-serif;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  max-height: 220px;
  width: 100%;
  background: #000000;
  text-align: left;
}

figure.snip1100 * {
  -webkit-box-sizing: padding-box;
  box-sizing: padding-box;
  -webkit-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}

figure.snip1100 img {
  opacity: 1;
  width: 100%;
}

figure.snip1100 figcaption {
  top: 30px;
  left: 30px;
  right: 30px;
  bottom: 30px;
  position: absolute;
  padding: 20px;
}

figure.snip1100 figcaption h3,
figure.snip1100 figcaption p {
  margin: 0 0 8px;
  opacity: 0;
}

figure.snip1100 figcaption h3 {
  position: relative;
  font-weight: 400;
  text-transform: uppercase;
  -webkit-transform: translateY(50%);
  transform: translateY(50%);
}

figure.snip1100 figcaption h3 span {
  font-weight: 800;
}

figure.snip1100 figcaption p {
  font-size: 0.9em;
  font-weight: 500;
}

figure.snip1100 figcaption:before,
figure.snip1100 figcaption:after,
figure.snip1100 figcaption div:before,
figure.snip1100 figcaption div:after {
  background-color: #ffffff;
  position: absolute;
  content: "";
  display: block;
  -webkit-transition: all 0.4s ease-in-out;
  transition: all 0.4s ease-in-out;
}

figure.snip1100 figcaption:before,
figure.snip1100 figcaption:after {
  width: 0;
  height: 1px;
}

figure.snip1100 figcaption div:before,
figure.snip1100 figcaption div:after {
  width: 1px;
  height: 0;
}

figure.snip1100 figcaption:before,
figure.snip1100 figcaption div:before {
  left: 0;
  top: 0;
}

figure.snip1100 figcaption:after,
figure.snip1100 figcaption div:after {
  bottom: 0;
  right: 0;
}

figure.snip1100 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 1;
}

figure.snip1100.blue {
  background: #0a212f;
}

figure.snip1100.red {
  background: #36100c;
}

figure.snip1100.yellow {
  background: #583804;
}

figure.snip1100:hover img,
figure.snip1100.hover img {
  opacity: 0.2;
  -webkit-filter: blur(5px);
  filter: blur(5px);
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

figure.snip1100:hover figcaption h3,
figure.snip1100.hover figcaption h3,
figure.snip1100:hover figcaption p,
figure.snip1100.hover figcaption p {
  opacity: 1;
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

figure.snip1100:hover figcaption p,
figure.snip1100.hover figcaption p {
  -webkit-transition-delay: 0.3s;
  transition-delay: 0.3s;
}

figure.snip1100:hover figcaption:before,
figure.snip1100.hover figcaption:before,
figure.snip1100:hover figcaption:after,
figure.snip1100.hover figcaption:after {
  width: 100%;
}

figure.snip1100:hover figcaption div:before,
figure.snip1100.hover figcaption div:before,
figure.snip1100:hover figcaption div:after,
figure.snip1100.hover figcaption div:after {
  height: 100%;
}


/* 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