Pen Settings



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


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


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.


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.


  <!-- --move: .1 defines the variable for that instance of the li -->
  <li factor="10" style="--fader: .1; --percent: 10;">Thing 1</li>
  <li style="--fader: .2; --percent: 20;">Thing 2</li>
  <li style="--fader: .3; --percent: 30;">Thing 3</li>
  <li style="--fader: .4;">Thing 4</li>
  <li style="--fader: .5;">Thing 5</li>


                li { 
  opacity: 0; 
  padding: 5px 0 5px 5px;
  list-style: none;
  background-color: rgba(200,50,255,var(--fader));
  display: block;
  width: 20%;
  height: 10%;

  @keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; } }

li { animation: fade 1.5s ease-in forwards; }

/* Since you're doing an animation, chances our the number of elements will be small, so you can just pre-define for however many versions using nth-child. This wouldn't work for use cases where, for example, you want a percentage of the whole instead of a fixed number */
/* li:nth-child(1) { animation-delay: 1s; }
li:nth-child(2) { animation-delay: 2s; }
li:nth-child(3) { animation-delay: 3s; }
li:nth-child(4) { animation-delay: 4s; }
li:nth-child(5) { animation-delay: 5s; }
li:nth-child(6) { animation-delay: 6s; }
li:nth-child(7) { animation-delay: 7s; }
li:nth-child(8) { animation-delay: 8s; } */

/* Below is an alternative approach using the same variable from the opacity. I added in a scaling factor to show how you can use one variable for multiple things in cases like this.  */ 
:root {--factor: 2; }
li { animation-delay: calc(10s * var(--fader));}