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

              
                
<header>
  <nav>
    <ul>
      <li><a href="#">Weird dolls</a></li>
      <li><a href="#">Undead pets</a></li>
      <li><a href="#">Clowns</a></li>
      <li><a href="#">Pale little girls</a></li>
    </ul>
  </nav>

  <h1>Creepy Children</h1>
  <p class="tagline">Hover over header for blood</p>
</header>
              
            
!

CSS

              
                header {
  /* Striped background */
  background: #2a1135;
  background-image:
    linear-gradient(90deg, transparent 50%, #190b20 50%);
  background-size: 52px;
  box-shadow: inset 0 0 100px #000;

  text-align: center;
  padding: 2em 2em 3em;
  position: relative;

  &::before,
  &::after {
    content: '';
    display: block;
    width: 100%;
    position: absolute;
    left: 0;
  }

  &::before {
    /* Red gradients for blood */
    background:
      linear-gradient(red 50%, transparent 60%),
      radial-gradient(#d40000 50%, transparent 70%),
      radial-gradient(red 30%, transparent 40%),
      radial-gradient(#d40000 10%, transparent 20%),
      radial-gradient(red 10%, transparent 15%);
    background-size: 100% 100%, 500px 500px, 200px 200px, 103px 273px, 77px 800px;
    background-position: 0 0, -97% -78%, 71% 0%, 7% 23%, 5% 49%;

    /* Background blend for bleed effect */
    mix-blend-mode: multiply;

    /* Mouse ignore blood */
    pointer-events: none;

    /* Hide before hover transition */
    opacity: 0;
    transform: translateY(-100%);

    /* Mouseout effect */
    transition: opacity 3s linear, transform 1s 3s linear;

    height: 100%;
    top: 0;
  }

  /* Hover transition */
  &:hover::before {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s 0s, transform 5s 0s linear;
  }

  /* Header bottom edge */
  &::after {
    background-image:
      radial-gradient(#07050a 40%, transparent 41%),
      radial-gradient(#07050a 40%, transparent 41%);
    background-size: 104px 104px;
    background-position: 0 0, 52px 0;

    height: 104px;
    bottom: -52px;
    z-index: -1;
  }
}

/* Styling */

body {
  background: #090917;
  font: 16px/1.5 'Old Standard TT', serif;
}

h1 {
  color: #fff;
  font: normal 52px 'Emilys Candy',serif;
  text-shadow: 3px 3px 0 #000;
  margin: 0.5em 0 0;
}

nav {
  /* Uncomment layer links above blood effect */
  //position: relative;

  ul,
  li {
    display: inline;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  a {
    color: #52d7ea;
    font-weight: 700;
    padding: 1em 2em;
    text-decoration: none;
    transition: all 1s;

    &:hover {
      letter-spacing: 0.2em;
    }
  }
}

.tagline {
  color: #dcbd77;
  margin: 0;
}

/* Remove effects on mobile, fix nav */
@media (max-width: 714px) {
  header::before {
    display: none;
  }

  nav {
    a {
      line-height: 2.5;
      padding: 1em;
      white-space: nowrap;

      &:hover {
        letter-spacing: 0;
      }
    }
  }

}
              
            
!

JS

              
                
              
            
!
999px

Console