Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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

              
                <svg viewBox="0 0 600 300">

  <!-- Pattern -->
  <pattern
           id="p-spots"
           width="50"
           height="50"
           viewBox="0 0 90 90"
           patternUnits="userSpaceOnUse"
           >

    <g class="g-spots">

      <ellipse rx="25" ry="35"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="25" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="5" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

    </g>

    <g class="g-spots"
       transform="translate(45,45)">

      <ellipse rx="25" ry="35"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="25" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="5" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

    </g>

    <g class="g-spots"
       transform="translate(-45,45)">

      <ellipse rx="25" ry="35"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="25" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="5" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

    </g>

    <g class="g-spots"
       transform="translate(-45,-45)">

      <ellipse rx="25" ry="35"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="25" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="5" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

    </g>

    <g class="g-spots"
       transform="translate(45,-45)">

      <ellipse rx="25" ry="35"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="25" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="20"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="15" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

      <ellipse rx="5" ry="10"
               cx="50"
               cy="50" 
               ></ellipse>

    </g>

  </pattern>

  <!-- Text -->
  <text text-anchor="middle"
        x="50%"
        y="50%"
        dy=".35em"
        class="text"
        >
    Text
  </text>

</svg>
              
            
!

CSS

              
                /* Main styles */
@import url(https://fonts.googleapis.com/css?family=Open+Sans:800);

.text {
  fill: none;
  stroke: url(#p-spots);
  stroke-width: 8;
  stroke-linejoin: round;
}

/* Colorize & animate pattern */
.g-spots ellipse {
  stroke-width: 0;
  stroke-opacity: 1;
  -webkit-animation: stroke 1.5s infinite;
  animation: stroke 1.5s infinite;
}

.g-spots ellipse:nth-child(5n + 1) {
  fill: #3F0B1B;
  stroke: #3F0B1B;
  -webkit-animation-delay: -0.3s;
  animation-delay: -0.3s;
}

.g-spots ellipse:nth-child(5n + 2) {
  fill: #7A1631;
  stroke: #7A1631;
  -webkit-animation-delay: -0.6s;
  animation-delay: -0.6s;
}

.g-spots ellipse:nth-child(5n + 3) {
  fill: #CF423C;
  stroke: #CF423C;
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}

.g-spots ellipse:nth-child(5n + 4) {
  fill: #FC7D49;
  stroke: #FC7D49;
  -webkit-animation-delay: -1.2s;
  animation-delay: -1.2s;
}

.g-spots ellipse:nth-child(5n + 5) {
  fill: #FFD462;
  stroke: #FFD462;
  -webkit-animation-delay: -1.5s;
  animation-delay: -1.5s;
}

/* Change stroke-width inside animation */
@-webkit-keyframes stroke {
  50% {
    stroke-width: 27;
    stroke-opacity: .5;
  }
}

@keyframes stroke {
  50% {
    stroke-width: 27;
    stroke-opacity: .5;
  }
}

/* Other styles */
html, body {
  height: 100%;
}

body {
  background: #21060e -webkit-linear-gradient(0deg, #21060e 50%, #18040a 50%);
  background: #21060e linear-gradient(90deg, #21060e 50%, #18040a 50%);
  background-size: .2em 100%;
  font: 14.5em/1 Open Sans, Impact;
  text-transform: uppercase;
  margin: 0;
}

svg {
  position: absolute;
  width: 100%;
  height: 100%;
}
              
            
!

JS

              
                
              
            
!
999px

Console