Pen Settings



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


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


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.


  Parsing the gradient list from
  with the help of
  shuffle and display it
  while animating the transition.

<div class="helper">
<!-- This helper is needed to animate the gradients, as linear-gradient is not transitionable -->

<div class="title">
  Dance To Forget<br>
  <small><a href=""></a>


                @import url(;

  margin: 0;
  padding: 0;
  min-height: 100%;

  position: relative;
  background: #FF4E50;
  background: linear-gradient(to left, #FF4E50 , #F9D423);
  transition: all .5s ease;
  overflow: hidden;
  font-family: Montserrat, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  opacity: 0;
  transition: opacity 1s ease;
     opacity: 1;

  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 1px 2px 5px rgba(black,.2);
  z-index: 1000;
    color: #fff;
    text-transform: none;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0;


                var uiGradientsUrl = '';

var html   = $('html'),
    helper = $('.helper'),
    title  = $('.title'),
    i = 0;

$.getJSON(uiGradientsUrl, function(data) {
  gradientsList = data;
  // Shuffle Array
  gradientsList.sort(function() { return 0.5 - Math.random() });

var bgChangeInterval = setInterval(function(){
  // Get gradient
  activeGradient = gradientsList[i];
  // Create link to
  var link = '' +\s+/g, '');
  title.html( + '<br><small><a href="'+link+'">'+link+'</a></small>');
  // Flip target for transition
  var target = html;
  if (i%2 == 0){
    target = helper;
  // Set new gradient
    'background' : activeGradient.colors[0] ,
    'background' : 'linear-gradient(to left, ' + activeGradient.colors[0] + ' ,' + activeGradient.colors[1] + ')'
  // Set i to next i - if not the last one
  i = ( gradientsList.length < i ? 0 : i);
}, 1500);