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

              
                <!-- CSS art code here -->

<!-- radial-gradient to make circles -->
<div class="container">
  <div class="mask-circle"></div>
</div>

<!-- Repeating Pattern Mask -->
<div class="container">
  <div class="mask-pattern"></div>
</div>

<!-- Knockout Text (Text Clipping) -->
<div class="container">
  <div class="knockout-text">
    <p class="gradient-text">CSS Art is Awesome!</p>
  </div>
</div>

<!-- Color gradient background -->
<div class="container">
  <div class="background-gradient"></div>
</div>
              
            
!

CSS

              
                /* radial-gradient to make circles */
.mask-circle {
  width: 500px;
  height: 450px;
  /* Background gradient */
  background: linear-gradient(
    125deg,
    royalblue,
    #5768df,
    #8164d7,
    #aa60c8,
    #cc60b3,
    #e3689c,
    #ed7889,
    #ee8c7e,
    #e99e7c,
    #e4ac7f,
    #e0b585,
    burlywood
  );

  /* Mask */
  /* webkit vendor prefix start */
  -webkit-mask: radial-gradient(circle at 50% 50%, black 30%, transparent 0%),
    radial-gradient(circle at 15% 15%, black 10%, transparent 0%),
    radial-gradient(circle at 85% 17%, black 12%, transparent 0%),
    radial-gradient(circle at 12% 85%, black 8%, transparent 0%),
    radial-gradient(circle at 85% 80%, black 12%, transparent 0%),
    radial-gradient(circle at 53% 20%, black 5%, transparent 0%),
    radial-gradient(circle at 77% 50%, black 5%, transparent 0%),
    radial-gradient(circle at 47% 93%, black 6%, transparent 0%),
    radial-gradient(circle at 17% 50%, black 8%, transparent 0%);
  -webkit-mask-repeat: no-repeat;
  /* webkit vendor prefix end */

  mask: radial-gradient(circle at 50% 50%, black 30%, transparent 0%),
    radial-gradient(circle at 15% 15%, black 10%, transparent 0%),
    radial-gradient(circle at 85% 17%, black 12%, transparent 0%),
    radial-gradient(circle at 12% 85%, black 8%, transparent 0%),
    radial-gradient(circle at 85% 80%, black 12%, transparent 0%),
    radial-gradient(circle at 53% 20%, black 5%, transparent 0%),
    radial-gradient(circle at 77% 50%, black 5%, transparent 0%),
    radial-gradient(circle at 47% 93%, black 6%, transparent 0%),
    radial-gradient(circle at 17% 50%, black 8%, transparent 0%);
  mask-repeat: no-repeat;
}

/* Repeating Pattern Mask */
.mask-pattern {
  width: 500px;
  height: 450px;
  /* Background gradient */
  background: linear-gradient(
    -120deg,
    royalblue,
    #5768df,
    #8164d7,
    #aa60c8,
    #cc60b3,
    #e3689c,
    #ed7889,
    #ee8c7e,
    #e99e7c,
    #e4ac7f,
    #e0b585,
    burlywood
  );
  /* Mask */
  /* webkit vendor prefix start */
  -webkit-mask: repeating-linear-gradient(
    45deg,
    black 5% 10%,
    transparent 10% 15%
  );
  /* webkit vendor prefix end */

  mask: repeating-linear-gradient(45deg, black 5% 10%, transparent 10% 15%);
}

/* Knockout Text (Text Clipping) */
.knockout-text {
  width: 500px;
  height: 450px;
  font: 900 6rem sans-serif;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gradient-text {
  /* Background gradient */
  background: linear-gradient(
    100deg,
    royalblue,
    #5768df,
    #8164d7,
    #aa60c8,
    #cc60b3,
    #e3689c,
    #ed7889,
    #ee8c7e,
    #e99e7c,
    #e4ac7f,
    #e0b585,
    burlywood
  );

  /* Background Clip */
  /* webkit vendor prefix start */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* webkit vendor prefix end */

  background-clip: text;
}

/* Color gradient background */
.background-gradient {
  width: 500px;
  height: 450px;
  background: linear-gradient(
    0deg,
    royalblue,
    #5768df,
    #8164d7,
    #aa60c8,
    #cc60b3,
    #e3689c,
    #ed7889,
    #ee8c7e,
    #e99e7c,
    #e4ac7f,
    #e0b585,
    burlywood
  );
}

/* 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: white;
  position: relative;
  margin: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

              
            
!

JS

              
                
              
            
!
999px

Console