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 id="light1" class="light"></div>
<div id="light2" class="light"></div>
<div id="light3" class="light"></div>
<svg viewBox='0 0 500 500' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg' style='display: none;'>
  <filter id='noiseFilter'>
    <feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch' />
  </filter>
</svg>
              
            
!

CSS

              
                body {
  --light-diameter: 50px;
  --light-radius: calc(var(--light-diameter) / 2);

  background: hsl(236deg 91% 10%);
  height: 100%;
  width: 100%;
  margin: 0;

  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#noiseFilter) brightness(0.4) contrast(1.1);
    mix-blend-mode: overlay;
    z-index: 10;
  }
}

.light {
  position: absolute;
  width: 100vw;
  background:
    /* Spotlight */ radial-gradient(
        hsl(240deg 70% 90%),
        hsl(240deg 70% 90%) 63%,
        transparent 75%
      )
      50% 0% / 25px 28px,
    /* Spotlight after image */
      radial-gradient(
        hsl(198deg 90% 95% / 90%),
        hsl(198deg 90% 95% / 90%) 10%,
        transparent 75%
      )
      50% -15px / 30px 100px,
    /* Light effect */
      conic-gradient(
        at 50% 5%,
        transparent 45%,
        hsl(240deg 100% 82%) 48%,
        hsl(240deg 100% 82%) 53%,
        transparent 56.5%
      )
      50% -25px / 100% 100%;

  background-blend-mode: overlay;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  opacity: 0.95;
  filter: blur(2px);

  -webkit-mask-image: radial-gradient(
    circle at 50% 0%,
    black 45%,
    transparent 120%
  );
}

#light1 {
  height: 150vh;
  left: -16vw;
  top: -60px;
  transform: rotate(-15deg);
}

#light2 {
  height: 125vh;
  left: 0;
  top: 5vh;
  transform: rotate(-2deg);
}

#light3 {
  height: 150vh;
  left: 15vw;
  top: -65px;
  transform: rotate(16deg);
}

              
            
!

JS

              
                
              
            
!
999px

Console