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="snip0075 blue">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample45.jpg" alt="sampl45" />
  <figcaption>
    <div><i class="ion-arrow-right-c"></i></div>
    <div>
      <h3>Winter Coats</h3>
    </div>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip0075 red hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample50.jpg" alt="sample50" />
  <figcaption>
    <div><i class="ion-arrow-right-c"></i></div>
    <div>
      <h3>Sportwear</h3>
    </div>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip0075 yellow"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample46.jpg" alt="sample46" />
  <figcaption>
    <div><i class="ion-arrow-right-c"></i></div>
    <div>
      <h3>Summer Jackets</h3>
    </div>
  </figcaption>
  <a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,600);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
figure.snip0075 {
  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: center;
}

figure.snip0075 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

figure.snip0075 img {
  opacity: 1;
  width: 100%;
  -webkit-transition: all 0.6s;
  transition: all 0.6s;
}

figure.snip0075 figcaption {
  position: absolute;
  top: 50%;
  left: 30px;
  height: 40px;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}

figure.snip0075 figcaption > div {
  overflow: hidden;
  height: 45px;
  position: relative;
  float: left;
}

figure.snip0075 figcaption > div:nth-of-type(1) {
  width: 45px;
}

figure.snip0075 figcaption > div:nth-of-type(2) {
  width: auto;
}

figure.snip0075 h3,
figure.snip0075 i {
  margin: 0;
  line-height: 45px;
}

figure.snip0075 h3 {
  background: #333333;
  font-weight: 800;
  padding-left: 15px;
  padding-right: 15px;
  text-transform: uppercase;
  -webkit-transform: translate3d(-100%, 0%, 0);
  transform: translate3d(-100%, 0%, 0);
}

figure.snip0075 i {
  position: absolute;
  font-size: 28px;
  height: 45px;
  width: 45px;
  top: 0;
  right: 0;
  background: #000000;
  -webkit-transform: translate3d(0%, 0%, 0);
  transform: translate3d(0%, 0%, 0);
}

figure.snip0075 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
}

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

figure.snip0075.blue h3 {
  background: #2980b9;
}

figure.snip0075.blue i {
  background: #1b557a;
}

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

figure.snip0075.red h3 {
  background: #c0392b;
}

figure.snip0075.red i {
  background: #81261d;
}

figure.snip0075.yellow {
  background: #562e0a;
}

figure.snip0075.yellow h3 {
  background: #e67e22;
}

figure.snip0075.yellow i {
  background: #a85913;
}

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

figure.snip0075:hover figcaption h3,
figure.snip0075.hover figcaption h3 {
  -webkit-transform: translate3d(0%, 0%, 0);
  transform: translate3d(0%, 0%, 0);
}

figure.snip0075:hover figcaption i,
figure.snip0075.hover figcaption i {
  -webkit-transform: translate3d(100%, 0%, 0);
  transform: translate3d(100%, 0%, 0);
}


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