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

              
                <!-- 
Did some refactoring. Due to the CSS stacking conflicts,
each div is now inside a wrapper. In this case it is the li tags.
-->

<ul>
  <li>
    <div class="one"></div>
  </li>
  <li>
    <div class="two"></div>
  </li>
  <li>
    <div class="three"></div>
  </li>
  <li>
    <div class="four"></div>
  </li>
</ul>
              
            
!

CSS

              
                /* Some Resets */

body, ul, li {
  margin: 0;
  padding: 0;
}

ul, li {
  list-style: none;
}

body, ul {
  display: flex;
  justify-content: center;
}

ul {
  margin-top: 5em;
  flex-wrap: wrap;
  max-width: 40em;
}

li {
  transition: transform .5s;
}

div {
  margin: 2em;
  width: 15em;
  height: 15em;
  position: relative;
}

/* These are the main colors, Try changing yourself to test */

.one { background: #6FE7DD; }
.two { background: #3490DE; }
.three { background: #6639A6; }
.four { background: #EA5455; }

/*
The transform is implemented on the wrapper,
so the ::after class can maintain the z-index.
If it was implemented on the div,
it would cause the ::after to move up the stack on hover state.
*/

li:hover {
  transform: scale(1.2);
  cursor: pointer;
}

/*
The trend for these colorful shadows,
are designed in a slightly different way.
They are NOT the standard drop shadows.
In tools like Sketch and Photoshop,
a rectangle less than the total width of the element,
is placed behind it, and then,
the drop shadow is implemented on that rectangle.
*/

div::after {
  z-index: -1;
  content: '';
  background: inherit;
  opacity: 0;
  height: 20%;
  width: 70%;
  position: absolute;
  margin-left: auto; margin-right: auto; left: 0; right: 0;
  bottom: 0;
  filter: blur(.9em);
  transition: opacity 1s, bottom 0.5s;
}

div:hover::after {
  opacity: .85;
  bottom: -.75em;
}
              
            
!

JS

              
                
              
            
!
999px

Console