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="snip1171">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample71.jpg" alt="sample71"/>
  <div class="price">$19.00</div>
  <figcaption>
    <h3>Wool Hat</h3>
    <p>
      Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.
    </p><a href="#">Add to Cart</a>
  </figcaption>
</figure>
<figure class="snip1171 blue hover">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample47.jpg" alt="sample47"/>
  <div class="price">$19.00</div>
  <figcaption>
    <h3>Denim Shirt </h3>
    <p>
      I don't need to compromise on my principles, because they don't have the slightest bearing on what happens to me anyway.
    </p><a href="#">Add to Cart</a>
  </figcaption>
</figure>
<figure class="snip1171 orange">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample52.jpg" alt="sample52"/>
  <div class="price">$19.00</div>
  <figcaption>
    <h3>Wax Jacket</h3>
    <p>
      You know that is the real problem with nature, something's always stinging you or oozing mucous all over you. Let's go and watch TV.
    </p><a href="#">Add to Cart</a>
  </figcaption>
</figure>
              
            
!

CSS

              
                /* Included color classes.. 
	.red 
	.blue 
	.orange
*/
@import url(https://fonts.googleapis.com/css?family=Raleway:400,800);
figure.snip1171 {
  font-family: 'Raleway', Arial, sans-serif;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 220px;
  max-width: 310px;
  width: 100%;
  background: #000000;
  color: #333;
  text-align: left;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
figure.snip1171 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.35s cubic-bezier(0.25, 0.5, 0.5, 0.9);
  transition: all 0.35s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
figure.snip1171 img {
  max-width: 100%;
  vertical-align: top;
}
figure.snip1171 figcaption {
  position: relative;
  background-color: #ffffff;
  padding: 20px 25px 50px;
}
figure.snip1171 h3 {
  position: absolute;
  bottom: 100%;
  text-transform: uppercase;
  padding: 0px 25px;
  line-height: 44px;
  margin: 0;
  left: 0;
  font-weight: 400;
  background-color: #000000;
  color: #ffffff;
}
figure.snip1171 h3 span {
  font-weight: 800;
}
figure.snip1171 h3:before {
  position: absolute;
  left: 100%;
  border-style: solid;
  border-width: 44px 0 0 12px;
  border-color: transparent transparent transparent #000000;
  content: '';
  top: 0;
}
figure.snip1171 p {
  font-size: 0.8em;
  font-weight: 500;
  text-align: left;
  margin: 0;
  line-height: 1.6em;
}
figure.snip1171 .price {
  position: absolute;
  top: 0;
  right: 0;
  color: #ffffff;
  background-color: #000000;
  padding: 0 10px;
  line-height: 40px;
  font-weight: 800;
}
figure.snip1171 .price:before {
  position: absolute;
  right: 100%;
  border-style: solid;
  border-width: 0 12px 40px 0;
  border-color: transparent #000000 transparent;
  content: '';
  top: 0;
}
figure.snip1171 a {
  text-decoration: none;
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: #000000;
  line-height: 40px;
  padding: 0 10px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9em;
  text-transform: uppercase;
}
figure.snip1171 a:before {
  position: absolute;
  right: 100%;
  border-style: solid;
  border-width: 0 0 40px 12px;
  border-color: transparent transparent #000000;
  content: '';
  top: 0;
}
figure.snip1171.blue {
  background-color: #2472a4;
}
figure.snip1171.blue h3,
figure.snip1171.blue a,
figure.snip1171.blue .price {
  background-color: #2472a4;
}
figure.snip1171.blue .price:before {
  border-color: transparent #2472a4 transparent;
}
figure.snip1171.blue h3:before {
  border-color: transparent transparent transparent #2472a4;
}
figure.snip1171.blue a:before {
  border-color: transparent transparent #2472a4;
}
figure.snip1171.red {
  background-color: #ab3326;
}
figure.snip1171.red h3,
figure.snip1171.red a,
figure.snip1171.red .price {
  background-color: #ab3326;
}
figure.snip1171.red .price:before {
  border-color: transparent #ab3326 transparent;
}
figure.snip1171.red h3:before {
  border-color: transparent transparent transparent #ab3326;
}
figure.snip1171.red a:before {
  border-color: transparent transparent #ab3326;
}
figure.snip1171.orange {
  background-color: #d67118;
}
figure.snip1171.orange h3,
figure.snip1171.orange a,
figure.snip1171.orange .price {
  background-color: #d67118;
}
figure.snip1171.orange .price:before {
  border-color: transparent #d67118 transparent;
}
figure.snip1171.orange h3:before {
  border-color: transparent transparent transparent #d67118;
}
figure.snip1171.orange a:before {
  border-color: transparent transparent #d67118;
}
figure.snip1171:hover img,
figure.snip1171.hover img {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

              
            
!

JS

              
                
              
            
!
999px

Console