Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <css-doodle>
  :doodle {
    flex: none;
    @grid: 12x16;
    @size: 800px 600px;
    overflow: hidden;
    background-color: #fff;
  }
  :container {
    animation: container 8s linear infinite both;
  }
  overflow: hidden;
  opacity: .85;
  @row(even) {
    animation: rowEven 8s ease both infinite @r(0, .15s);

    ::before { animation: before 8s ease both infinite @r(0, .15s); }
    ::after { animation: after 8s ease both infinite @r(0, .15s); }

    @odd {
      ::before { background-image: linear-gradient(#222052 50%, #ef4053 50%); }
      ::after { background-image: linear-gradient(#8D4024 50%, #fff 50%); }
    }
    @even {
      ::before { background-image: linear-gradient(90deg, #331610 50%, #D48835 50%); }
      ::after { background-image: linear-gradient(90deg, #F36E55 50%, #fff 50%); }
    }
  }
  @row(odd) {
    animation: rowOdd 8s ease both infinite @r(2s, 2.15s);

    ::before { animation: before 8s ease both infinite @r(2s, 2.15s); }
    ::after { animation: after 8s ease both infinite @r(2s, 2.15s); }

    @odd {
      ::before { background-image: linear-gradient(#2589AD 50%, #ef4053 50%); }
      ::after { background-image: linear-gradient(#066569 50%, #0D2429 50%); } 
    }
    @even {
      ::before { background-image: linear-gradient(90deg, #F3CE28 50%, #fff 50%); }
      ::after { background-image: linear-gradient(90deg, #EA9322 50%, #F36E55 50%); }
    }
  }
  ::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    @size: 100%;
  }
  ::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    @size: 80%;
    margin-top: -40%;
    margin-left: -40%;
    border-radius: 100%;
  }
  @keyframes rowEven {
    0% { transform: translate(50%, 0);}
    6% { transform: translate(155%, 0);}
    10% { transform: translate(150%, 0);}
    50% { transform: translate(150%, 0);}
    55% { transform: translate(45%, 0);}
    60% { transform: translate(50%, 0);}
    100% { transform: translate(50%, 0); }
  }
  @keyframes rowOdd {
    0% { transform: translate(0%, 0);}
    6% { transform: translate(105%, 0);}
    10% { transform: translate(100%, 0);}
    50% { transform: translate(100%, 0);}
    55% { transform: translate(-5%, 0);}
    60% { transform: translate(0%, 0);}
    100% { transform: translate(0%, 0); }
  }
  @keyframes before {
    0% { transform: rotate(0deg) }
    6% { transform: rotate(95deg) }
    10% { transform: rotate(90deg) }
    50% { transform: rotate(90deg) }
    55% { transform: rotate(-5deg) }
    60% { transform: rotate(0deg) }
  }
  @keyframes after {
    0% { transform: rotate(0deg) }
    6% { transform: rotate(-95deg) }
    10% { transform: rotate(-90deg) }
    50% { transform: rotate(-90deg) }
    55% { transform: rotate(5deg) }
    60% { transform: rotate(0deg) }
  }
  @keyframes container {
    0% { transform: scale(3) rotate(-45deg) translate3d(50px, -50px, 0); }
    100% { transform: scale(3) rotate(-45deg) translate3d(-50px, 50px, 0); }
  }
</css-doodle>
              
            
!

CSS

              
                html, body {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #f4f4f4;
}
              
            
!

JS

              
                
              
            
!
999px

Console