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="container">
  <div class="linear-gradient"></div>
</div>

<div class="container">
  <div class="linear-gradient-to-top-left"></div>
</div>

<div class="container">
  <div class="linear-gradient-repeat"></div>
</div>

<div class="container">
  <div class="linear-gradient-three-colors"></div>
</div>

<div class="container">
  <div class="radial-gradient"></div>
</div>

<div class="container">
  <div class="radial-gradient-circle"></div>
</div>

<div class="container">
  <div class="radial-gradient-circle-bottom-left"></div>
</div>

<div class="container">
  <div class="radial-gradient-three-colors"></div>
</div>

<div class="container">
  <div class="radial-gradient-repeat"></div>
</div>

<div class="container">
  <div class="conic-gradient"></div>
</div>

<div class="container">
  <div class="conic-gradient-position"></div>
</div>

<div class="container">
  <div class="conic-gradient-two-colors"></div>
</div>

<div class="container">
  <div class="conic-gradient-two-colors-expanded"></div>
</div>

<div class="container">
  <div class="conic-gradient-repeating"></div>
</div>

<div class="container">
  <div class="conic-gradient-chart"></div>
</div>

<div class="container">
  <div class="conic-gradient-multi-color"></div>
</div>
              
            
!

CSS

              
                /* CSS Gradients */

.linear-gradient {
  width: 450px;
  height: 350px;
  background: linear-gradient(peru, seashell);
}

.linear-gradient-to-top-left {
  width: 450px;
  height: 350px;
  background: linear-gradient(to top left, peru, seashell);
}

.linear-gradient-repeat {
  width: 450px;
  height: 350px;
  background: repeating-linear-gradient(45deg, peru 20%, seashell 40%);
}

.linear-gradient-three-colors {
  width: 450px;
  height: 350px;
  background: linear-gradient(
    seashell 0 33%,
    peru 33% 65%,
    darkmagenta 65% 100%
  );
}

.radial-gradient {
  width: 450px;
  height: 350px;
  background: radial-gradient(peru, seashell);
}

.radial-gradient-circle {
  width: 450px;
  height: 350px;
  background: radial-gradient(circle 160px, peru, seashell);
}

.radial-gradient-circle-bottom-left {
  width: 450px;
  height: 350px;
  background: radial-gradient(circle at bottom left, peru, seashell);
}

.radial-gradient-three-colors {
  width: 450px;
  height: 350px;
  background: radial-gradient(
    circle,
    darkmagenta 0 25%,
    seashell 25% 55%,
    peru 55% 100%
  );
}

.radial-gradient-repeat {
  width: 450px;
  height: 350px;
  background: repeating-radial-gradient(circle at 100%, peru 15%, seashell 30%);
}

.conic-gradient {
  width: 450px;
  height: 350px;
  background: conic-gradient(seashell, peru);
}

.conic-gradient-position {
  width: 450px;
  height: 350px;
  background: conic-gradient(from 180deg, seashell, peru);
}

.conic-gradient-two-colors {
  width: 450px;
  height: 350px;
  background: conic-gradient(seashell 180deg, peru 0deg);
}

.conic-gradient-two-colors-expanded {
  width: 450px;
  height: 350px;
  background: conic-gradient(seashell 235deg, peru 0deg);
}

.conic-gradient-repeating {
  width: 450px;
  height: 350px;
  background: repeating-conic-gradient(seashell, peru 36deg);
}

.conic-gradient-chart {
  width: 400px;
  height: 400px;
  background: conic-gradient(seashell 40%, darkmagenta 0deg 70%, peru 0deg);
  border-radius: 50%;
}

.conic-gradient-multi-color {
  width: 450px;
  height: 350px;
  background: conic-gradient(
    seashell 0deg 72deg,
    burlywood 72deg 144deg,
    darkmagenta 144deg 216deg,
    orange 216deg 288deg,
    peru 288deg 360deg
  );
}

/* Body and Container Settings */
/* Center shapes */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Set blue background and light gray border */
.container {
  width: 500px;
  height: 450px;
  border: 5px solid lightgray;
  background: royalblue;
  position: relative;
  margin: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

              
            
!

JS

              
                
              
            
!
999px

Console