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="grid">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
  <div>7</div>
  <div>8</div>
  <div>9</div>
</div>
              
            
!

CSS

              
                body {
  background: linear-gradient(coral, rebeccapurple);
  border: 10px solid white;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;  
}

.grid {
  flex: 0 0 auto;
  perspective: 600px;
  display: grid;
  grid-template-columns: repeat(3, 150px);
  grid-template-rows: repeat(3, 150px);
  grid-gap: 20px;
  max-width: 480px;
  transform: rotate(45deg);

  div {
    background: rgba(white,.15);
    border: 1px solid rgba(white,.25);
    padding: 20px;
    color: transparent;
    box-shadow: 30px 30px 30px -20px rgba(black,.6);
    border-radius: 2px;
    &:nth-child(odd) {animation: 1000ms ease-in-out infinite alternate pulse;}
    &:nth-child(even) {animation:  1000ms 1000ms ease-in-out infinite alternate pulse;}
  }
}

@keyframes pulse {
  to { 
    transform: translate3d(0px, 0px, -60px);  
    box-shadow: 15px 15px 20px -20px rgba(black,.8) 
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console