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 class="container">
  
  <div class="row">  
    <div class="col">
      <div class="card">
        <div class="image one">
        </div>
      </div>
    </div>
    
    <div class="col">
      <div class="card">
        <div class="image two">
        </div>
      </div>
    </div>
    
    <div class="col">
      <div class="card">
        <div class="image three">
          <h1>Lorem Ipsum Dolor Amet</h1>
          <p>lorem ipsum dolor amet</p>
        </div>
      </div>
    </div>
  </div>
  
  <div class="row">  
    <div class="col">
      <div class="card">
        <div class="image four">
        </div>
      </div>
    </div>
    
    <div class="col">
      <div class="card">
        <div class="image five">
        </div>
      </div>
    </div>
    
    <div class="col">
      <div class="card">
        <div class="image six">
        </div>
      </div>
    </div>
  </div>
  
  <div class="row">  
    <div class="col">
      <div class="card">
        <div class="image seven">
        </div>
      </div>
    </div>
    
    <div class="col">
      <div class="card">
        <div class="image eight">
        </div>
      </div>
    </div>
    
    <div class="col">
      <div class="card">
        <div class="image nine">
        </div>
      </div>
    </div>
  </div>
  
</div>
              
            
!

CSS

              
                $color-tan: #ede1d1;
$color-red: #E53E00;

body {
  padding: 50px;
  background: $color-tan;
}

.col {
  margin-bottom: 30px;
}

.card {
  height: 300px;
  background-color: $color-red;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  border: none;
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);

  transition: box-shadow 3s ease-in;
  &:hover {
    transition: box-shadow .35s ease-out;
    cursor: pointer;
    box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
    .image {
      opacity: .3;
      transition: all 3s ease-in-out;
      transform: scale(1.5);
    }
  }
}

.image {
  background: url('https://picsum.photos/300?image=0') no-repeat center;
  background-size: cover;
  transition: transform 0.35s ease-in-out;
}

.one {
  @extend .card;
  background: url('https://picsum.photos/300?image=1079') no-repeat center;
  background-size: cover;
}

.two {
  @extend .card;
  background: url('https://picsum.photos/300?image=1069') no-repeat center;
  background-size: cover;
}

.three {
  @extend .card;
  background: url('https://picsum.photos/300?image=1005') no-repeat center;
  background-size: cover;
  text-align: center;
  padding: 20px;
  color: #FFF;
}

.four {
  @extend .card;
  background: url('https://picsum.photos/300?image=1075') no-repeat center;
  background-size: cover;
}

.five {
  @extend .card;
  background: url('https://picsum.photos/300?image=995') no-repeat center;
  background-size: cover;
}

.six {
  @extend .card;
  background: url('https://picsum.photos/300?image=83') no-repeat center;
  background-size: cover;
}

.seven {
  @extend .card;
  background: url('https://picsum.photos/300?image=1028') no-repeat center;
  background-size: cover;
}

.eight {
  @extend .card;
  background: url('https://picsum.photos/300?image=331') no-repeat center;
  background-size: cover;
}

.nine {
  @extend .card;
  background: url('https://picsum.photos/300?image=67') no-repeat center;
  background-size: cover;
}
              
            
!

JS

              
                
              
            
!
999px

Console