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 class="pacman"></div>
<br />

<div class="pacman-close"></div>
<br />

<div class="ghost"></div>

              
            
!

CSS

              
                .pacman, .pacman-close {
  position: relative;
  width: 36px;
  height: 36px;
  overflow: hidden;
}

.pacman:before {
  position: absolute;
  content: '';
  display: block;
  top: -4px;
  left: 0px;
  width: 4px;
  height: 4px;
  box-shadow: 
    /* 1 */
    0px 16px #ffd400,
    0px 20px #ffd400,
    0px 24px #ffd400,
    /* 2 */
    4px 8px #ffd400,
    4px 12px #ffd400,
    4px 16px #ffd400,
    4px 20px #ffd400,
    4px 24px #ffd400,
    4px 28px #ffd400,
    4px 32px #ffd400,
    /* 3 */
    8px 8px #ffd400,
    8px 12px #ffd400,
    8px 16px #ffd400,
    8px 20px #ffd400,
    8px 24px #ffd400,
    8px 28px #ffd400,
    8px 32px #ffd400,
    /* 4 */
    12px 4px #ffd400,
    12px 8px #ffd400,
    12px 12px #ffd400,
    12px 16px #ffd400,
    12px 20px #ffd400,
    12px 24px #ffd400,
    12px 28px #ffd400,
    12px 32px #ffd400,
    12px 36px #ffd400,
    /* 5 */
    16px 4px #ffd400,
    16px 8px #ffd400,
    16px 12px #ffd400,
    16px 16px #ffd400,
    16px 20px #ffd400,
    16px 24px #ffd400,
    16px 28px #ffd400,
    16px 32px #ffd400,
    16px 36px #ffd400,
    /* 6 */
    20px 4px #ffd400,
    20px 8px #ffd400,
    20px 12px black,
    20px 16px #ffd400,
    20px 24px #ffd400,
    20px 28px #ffd400,
    20px 32px #ffd400,
    20px 36px #ffd400,
    /* 7 */
    24px 8px #ffd400,
    24px 12px #ffd400,
    24px 16px #ffd400,
    24px 24px #ffd400,
    24px 28px #ffd400,
    24px 32px #ffd400,
    /* 8 */
    28px 8px #ffd400,
    28px 12px #ffd400,
    28px 28px #ffd400,
    28px 32px #ffd400,
    /* 9 */
    32px 12px #ffd400,
    32px 28px #ffd400
}


.pacman-close:before {
  position: absolute;
  content: '';
  display: block;
  top: -4px;
  left: 0px;
  width: 4px;
  height: 4px;
  box-shadow: 
    /* 1 */
    0px 16px #ffd400,
    0px 20px #ffd400,
    0px 24px #ffd400,
    /* 2 */
    4px 8px #ffd400,
    4px 12px #ffd400,
    4px 16px #ffd400,
    4px 20px #ffd400,
    4px 24px #ffd400,
    4px 28px #ffd400,
    4px 32px #ffd400,
    /* 3 */
    8px 8px #ffd400,
    8px 12px #ffd400,
    8px 16px #ffd400,
    8px 20px #ffd400,
    8px 24px #ffd400,
    8px 28px #ffd400,
    8px 32px #ffd400,
    /* 4 */
    12px 4px #ffd400,
    12px 8px #ffd400,
    12px 12px #ffd400,
    12px 16px #ffd400,
    12px 20px #ffd400,
    12px 24px #ffd400,
    12px 28px #ffd400,
    12px 32px #ffd400,
    12px 36px #ffd400,
    /* 5 */
    16px 4px #ffd400,
    16px 8px #ffd400,
    16px 12px #ffd400,
    16px 16px #ffd400,
    16px 20px #ffd400,
    16px 24px #ffd400,
    16px 28px #ffd400,
    16px 32px #ffd400,
    16px 36px #ffd400,
    /* 6 */
    20px 4px #ffd400,
    20px 8px #ffd400,
    20px 12px black,
    20px 16px #ffd400,
    20px 20px #ffd400,
    20px 24px #ffd400,
    20px 28px #ffd400,
    20px 32px #ffd400,
    20px 36px #ffd400,
    /* 7 */
    24px 8px #ffd400,
    24px 12px #ffd400,
    24px 16px #ffd400,
    24px 20px #ffd400,
    24px 24px #ffd400,
    24px 28px #ffd400,
    24px 32px #ffd400,
    /* 8 */
    28px 8px #ffd400,
    28px 12px #ffd400,
    28px 16px #ffd400,
    28px 20px #ffd400,
    28px 24px #ffd400,
    28px 28px #ffd400,
    28px 32px #ffd400,
    /* 9 */
    32px 16px #ffd400,
    32px 20px #ffd400,
    32px 24px #ffd400
}

.ghost {
  position: relative;
  width: 36px;
  height: 40px;
  overflow: hidden;
}

.ghost {
  position: relative;
  width: 36px;
  height: 40px;
  overflow: hidden;
}

.ghost:before {
  position: absolute;
  content: '';
  display: block;
  top: -4px;
  left: 0px;
  width: 4px;
  height: 4px;
  box-shadow: 
    /* 1 */
    0px 16px red,
    0px 20px red,
    0px 24px red,
    0px 28px red,
    0px 32px red,
    0px 36px red,
    0px 40px red,
    
    /* 2 */
    4px 8px red,
    4px 12px red,
    4px 16px red,
    4px 20px red,
    4px 24px red,
    4px 28px red,
    4px 32px red,
    4px 36px red,
    
    /* 3 */
    8px 4px red,
    8px 8px red,
    8px 12px red,
    8px 16px white,
    8px 20px red,
    8px 24px red,
    8px 28px red,
    8px 32px red,
    
    /* 4 */
    12px 4px red,
    12px 8px red,
    12px 12px white,
    12px 16px black,
    12px 20px white,
    12px 24px red,
    12px 28px red,
    12px 32px red,
    12px 36px red,
    
    /* 5 */
    16px 4px red,
    16px 8px red,
    16px 12px red,
    16px 16px red,
    16px 20px red,
    16px 24px red,
    16px 28px red,
    16px 32px red,
    16px 36px red,
    16px 40px red,
    
    /* 6 */
    20px 4px red,
    20px 8px red,
    20px 12px red,
    20px 16px white,
    20px 20px red,
    20px 24px red,
    20px 28px red,
    20px 32px red,
    20px 36px red,
    
    /* 7 */
    24px 8px red,
    24px 12px white,
    24px 16px black,
    24px 20px white,
    24px 24px red,
    24px 28px red,
    24px 32px red,
    
    /* 8 */
    28px 12px red,
    28px 16px red,
    28px 20px red,
    28px 24px red,
    28px 28px red,
    28px 32px red,
    28px 36px red,
    
    /* 9 */
    32px 16px red,
    32px 20px red,
    32px 24px red,
    32px 28px red,
    32px 32px red,
    32px 36px red,
    32px 40px red
    ;
}
              
            
!

JS

              
                
              
            
!
999px

Console