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

              
                <div id="container">
  <div class="container_row">
    <div id="card-veg" class="card card--skew_right">
      <img src="https://raw.githubusercontent.com/paul-duvall/website_images/master/organic-box/organic-box-veg-large.jpg" alt="Vegetables">
      <h1>Veg Boxes</h1>
      <p>Our organic veg boxes will surprise you every week</p>
      <div>
        <img src="https://raw.githubusercontent.com/paul-duvall/website_images/master/organic-box/organic-boxes-arrow.png">
        <a href="#" class="button">Design your veg box</a>
      </div>
    </div>

    <div id="card-fruit" class="card">
      <img src="https://raw.githubusercontent.com/paul-duvall/website_images/master/organic-box/organic-box-fruit-large.jpg">
      <h1>Fruit Boxes</h1>
      <p>Hand-picked salad and the freshest fruit fill these boxes</p>
      <div>
        <a href="#" class="button">Design your fruit box</a>
      </div>
    </div>  
  </div>
  <div class="container_row">
    <div id="card-meat" class="card card--skew_right">
      <img src="https://raw.githubusercontent.com/paul-duvall/website_images/master/organic-box/organic-box-meat-large.jpg">
      <h1>Meat Boxes</h1>
      <p>Organic meat from our own butchers</p>
      <div>
        <a href="#" class="button">Design your meat box</a>
      </div>
    </div>

    <div id="card-dairy" class="card card--skew_right">
      <img src="https://raw.githubusercontent.com/paul-duvall/website_images/master/organic-box/organic-box-dairy-large.jpg">
      <h1>Dairy Boxes</h1>
      <p>An incredible range of cheeses as well as milk and eggs</p>
      <div>
        <a href="#" class="button">Design your dairy box</a>
      </div>
    </div>  
  </div>
</div>
<footer>
  <div>Photo credits: Caroline Attwood, William Felker, and Jez Timms on Unsplash</div>
  <div>Designed by <a href="https://pjdwebdesign.com/">pjdwebdesign.com</a></div>
</footer>
              
            
!

CSS

              
                // This mixin creates the media queries allowing for the design to be responsive on smaller screens
@mixin respond($breakpoint) {
  @if $breakpoint == medium {
    @media (max-width: 1000px) { @content };
  }
  @if $breakpoint == small {
    @media (max-width: 700px) { @content };
  }
}

#container {
  padding: 20px;
}

.container_row {
  display: flex;
  justify-content: center;
  flex-direction: row;
  
  @include respond(small) {
    flex-direction: column;
    align-items: center;
  }
}

.card {
  height: 250px;
  margin: 10px;
  overflow: hidden;
  position: relative;
  transform: skewX(-15deg);  
  width: 400px;
  
  @include respond(medium) {
    width: 40%;
  }
  
  @include respond(small) {
    width: 80%;
  }
  
  img {
    left: -30px;
    position: absolute;
    transform: skewX(15deg);
    width: 500px;
  }
  
  h1 {
    font-family: 'Neucha', cursive;
    font-weight: 400;
    letter-spacing: 2px;
    width: 40%;
    margin: 10px;
    padding: 10px;
    padding-left: 35px;
    background-color: rgba(0,0,0,.35);
    color: white;
    -webkit-clip-path: polygon(15% 5%, 100% 0, 100% 80%, 0% 100%);
    clip-path: polygon(15% 5%, 100% 0, 100% 80%, 0% 100%);
    transform: skewX(15deg);
  }
  
  p {
    transform: skewX(15deg);
    padding: 10px;
    background-color: rgba(0,0,0,.35);
    color: white;
    padding-left: 35px;
    font-family: 'Roboto', sans-serif;
    width: 70%;
    font-weight: 400;
    clip-path: polygon(5% 5%, 97% 0, 100% 100%, 0% 80%);
  }
  
  div {
    transform: skewX(15deg);
    position: absolute;
    right: -17px;
    bottom: -7px;;
    padding: 20px 10px;
    
    a {
      transform: skewX(15deg);
      background: rgba(255,255,255,.8);
      padding: 15px 5px;
      padding-right: 15px;
      width: 100%;
      height: 100%;
      text-decoration: none;
      color: #6D6D6D;
    }
  }
}

footer {
  margin-top: 10px;
  text-align: center;
  color: grey;
  font-size: 14px;
  
  a:link, a:visited {
    color: #6D6D6D;
  }
  
  a:hover {
    color: #2e2e2e;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console