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.


                <!-- comment in/out whichever example you want -->

<div class="alert">
  <p>Heads up #1! There’s a new message for you.</p>

<div class="alert-with-fade-out">
  <p>Heads up #2! There’s a new message for you.</p>


                @keyframes fadeIn {
  /* for a 2-step animation in keyframes just define start or end */
  0% { opacity: 0; }

  /* Alternatively: 100% { opacity: 1; } */
.alert {
  /* 'forwards' makes animation stop on the last frame i.e. the 100% state */
  /* animation: fadeIn 4s 100ms forwards ease; */
  animation: fadeIn 4s ease-in-out; 

@keyframes fadeInAndOut {
  /* 0% { opacity: 0; } */
  50% { opacity: 1; }
  100% { opacity: 0; }

.alert-with-fade-out {
  opacity: 0;
  animation: fadeInAndOut 8s 100ms ease; 

/* Old stuff: 
if animating opacity is not supported, 
our element will simply show without the fade. */
/* @supports (opacity: 0) and (animation: fadeIn ease 4s) {
} */

/* non-important styles */

.alert-with-fade-out {
  border: 4px solid #333;
  padding: 1rem;
  margin: 1rem;
  text-align: center;

body {
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 125%;
	margin: 0 auto;
	max-width: 42em;
	width: 88%;

button {
	font: inherit;