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

              
                <main>
  <div class="outer">
    <div class="inner"></div>
  </div>
</main>
              
            
!

CSS

              
                body {
  margin: 0;
}

main {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.outer {
  position: relative;
  width: 100vw;
  height: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(closest-side, red 0%, transparent 50%, white 100%),
    conic-gradient(
      red 0deg,
      pink 10deg 25deg,
      red 35deg 55deg,
      pink 65deg 85deg,
      red 95deg 115deg,
      pink 125deg 145deg,
      red 155deg 175deg,
      pink 185deg 205deg,
      red 215deg 235deg,
      pink 245deg 265deg,
      red 275deg 295deg,
      pink 305deg 325deg,
      red 335deg
    );
}

.outer::before {
  content: "";
  position: absolute;
  top: -10vw;
  left: -10vw;
  width: 120vw;
  height: 120vw;
  background: radial-gradient(
      closest-side,
      transparent 0%,
      transparent 50%,
      white 100%
    ),
    conic-gradient(
      transparent 0deg,
      yellow 10deg 25deg,
      transparent 35deg 55deg,
      yellow 65deg 85deg,
      transparent 95deg 115deg,
      yellow 125deg 145deg,
      transparent 155deg 175deg,
      yellow 185deg 205deg,
      transparent 215deg 235deg,
      yellow 245deg 265deg,
      transparent 275deg 295deg,
      yellow 305deg 325deg,
      transparent 335deg
    );
  animation: spin 15s linear infinite;
  mix-blend-mode: screen;
}

.outer::after {
  content: "";
  position: absolute;
  top: -10vw;
  left: -10vw;
  width: 120vw;
  height: 120vw;
  background: radial-gradient(
      closest-side,
      transparent 0%,
      transparent 70%,
      white 100%
    ),
    conic-gradient(
      transparent 0deg,
      orange 10deg 25deg,
      transparent 35deg 55deg,
      orange 65deg 85deg,
      transparent 95deg 115deg,
      orange 125deg 145deg,
      transparent 155deg 175deg,
      orange 185deg 205deg,
      transparent 215deg 235deg,
      orange 245deg 265deg,
      transparent 275deg 295deg,
      orange 305deg 325deg,
      transparent 335deg
    );
  animation: spin 23s linear infinite;
  mix-blend-mode: screen;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.inner {
  width: 300px;
  height: 400px;
  background-image: url(https://source.unsplash.com/qwzbW8zruIE);
  background-size: cover;
  background-position: top center;
  background-color: white;
  border-radius: 20px;
  border: 8px solid black;
  box-shadow: 0px 0px 40px 20px rgba(255, 255, 0, 1);
  z-index: 3;
}

              
            
!

JS

              
                
              
            
!
999px

Console