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>
  <p class="custom-heading-1">Fun Rainbow Text Animation</p>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Nosifer');

@keyframes colorChange {
  0% {  
    color: red;
    text-shadow: 
    2px -2px 0 red, 
    -2px 2px 2px orange, 
    -4px 4px 2px yellow,
    -6px 6px 2px green, 
    -8px 8px 2px blue, 
    -10px 20px 2px indigo; 
  }

  18% {  
    color: indigo;
    text-shadow: 
    2px -2px 0 indigo, 
    -2px 2px 2px red, 
    -4px 4px 2px orange,
    -6px 6px 2px yellow, 
    -8px 8px 2px green, 
    -10px 20px 2px blue; 
  }

  36% {  
    color: blue;
    text-shadow: 
    2px -2px 0 blue, 
    -2px 2px 2px indigo, 
    -4px 4px 2px red,
    -6px 6px 2px orange, 
    -8px 8px 2px yellow, 
    -10px 20px 2px green; 
  }

  54% {  
    color: green;
    text-shadow: 
    2px -2px 0 green, 
    -2px 2px 2px blue, 
    -4px 4px 2px indigo,
    -6px 6px 2px red, 
    -8px 8px 2px orange, 
    -10px 20px 2px yellow;  
  }
  
  72% {  
    color: yellow;
    text-shadow: 
    2px -2px 0 yellow, 
    -2px 2px 2px green, 
    -4px 4px 2px blue,
    -6px 6px 2px indigo, 
    -8px 8px 2px red, 
    -10px 20px 2px orange;  
  }

  90% {  
    color: orange;
    text-shadow: 
    2px -2px 0 orange, 
    -2px 2px 2px yellow, 
    -4px 4px 2px green,
    -6px 6px 2px blue, 
    -8px 8px 2px indigo, 
    -10px 20px 2px red;    
  }
  
  100% {  
    color: red;
    text-shadow: 
    2px -2px 0 red, 
    -2px 2px 2px orange, 
    -4px 4px 2px yellow,
    -6px 6px 2px green, 
    -8px 8px 2px blue, 
    -10px 20px 2px indigo; 
  }
}
.custom-heading-1 {
  font-family: 'Nosifer';
  font-size: 80px;
  text-align: center;
  transition: text-shadow 2s;
  color: red;
  text-shadow: 
  1px -1px 0 red, 
  -1px 2px 1px orange, 
  -2px 4px 1px yellow,
  -3px 6px 1px green, 
  -4px 8px 1px blue, 
  -5px 10px 1px indigo; 
  animation: colorChange 3s linear infinite;
}


              
            
!

JS

              
                  /* Purposely excluded violet*/
              
            
!
999px

Console