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.


                <h1>Hover me<span id="hide">&nbsp;to see some more text</span>!</h1>


                body {
  height: 100vh;
  overflow: hidden;
  background-color: #121212;
  color: #fafafa;
  font-family: "Calibri", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

/* A quick explaination of how this effect works. A span elemnt won't have a width of it's own. So we convert it to an inline-block using the display property. Then we turn down the max-width of the element to 0. The reason we use max-width is due to a side-effect which is harder to explain in words so just try to replace that with width ;). You'll see that even when we changed the element's width to 0, it's still showing the text. For this we re gonna use overflow property and set it to hidden. To keep the text in one line and aligned properly, we are gonna use the white-space and vertical-align property as set below. The final thing we'll do is to give transition to the max-width property. */
#hide {
  display: inline-block;
  max-width: 0%;
  vertical-align: bottom;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 1s ease-in-out;

h1 {
  cursor: default;
  font-size: 5vw;

/* On hover of the h1 tag, we are gonna max out the max-width. */
h1:hover #hide {
  max-width: 100%;