123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              
<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>
            
          
!
            
              /* 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);
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console