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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <section class="ar">
  <svg viewBox="0 0 100 100">
    <clipPath id="clip">
      <text x="50" y="43" textLength="90" font-size="50">OMG</text>
      <text x="50" y="55" textLength="90" font-size="16">PSYCHEDELIC</text>
      <text x="50" y="89" textLength="90" font-size="50">SVG</text>
    </clipPath>
    <g clip-path="url(#clip)" id="rays">
      <path id="ray01" d="M50 0V100H45L55 0z"/>
      <path id="ray02" d="M40 100L60 0H65L35 100z"/>
      <path id="ray03" d="M70 0L30 100H25L75 0z"/>
      <path id="ray04" d="M80 0L20 100H15L85 0z"/>
      <path id="ray05" d="M90 0L10 100H5L95 0z"/>
      <path id="ray06" d="M100 0L0 100V95L100 5z"/>
      <path id="ray07" d="M100 10L0 90V85L100 15z"/>
      <path id="ray08" d="M100 20L0 80V75L100 25z"/>
      <path id="ray09" d="M0 70L100 30V35L0 65z"/>
      <path id="ray10" d="M0 60L100 40V45L0 55z"/>
      <path id="ray11" d="M0 50H100V55L0 45z"/>
      <path id="ray12" d="M100 65L0 35V40L100 60z"/>
      <path id="ray13" d="M0 25L100 75V70L0 30z"/>
      <path id="ray14" d="M0 20L100 80V85L0 15z"/>
      <path id="ray15" d="M0 10L100 90V95L0 5z"/>
      <path id="ray16" d="M0 0L100 100H95L5 0z"/>
      <path id="ray17" d="M10 0L90 100H85L15 0z"/>
      <path id="ray18" d="M20 0L80 100H75L25 0z"/>
      <path id="ray19" d="M30 0L70 100H65L35 0z"/>
      <path id="ray20" d="M60 100L40 0H45L55 100z"/>
    </g>
  </svg>
</section>
<aside>
  <p>"Don't do this because this is just incredibly ugly".
    <br/><br/>
    Also:
  <ul>
    <li>Don't use CodePen for what it was designed for.
    <li>Don't try anything new.
    <li>Don't experiment.
    <li>Don't imagine how you could use these ideas elsewhere.
    <li>Don't have fun.
    <li>also, Don't edit, misrepresent and then use this in a CSSConf talk.
  </ul>
</aside>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro);
html {
  min-height: 100%;
  font-family: "Source Code Pro";
}

body {
  background-color: hsl(0, 0%, 11%);
}

ar {
  width: 100%;
  height: 0;
  padding-top: 100%;
  position: relative;
}

svg {
  background-color: hsl(0, 0%, 7%);
  position: absolute;
  top: 0;
  left: 0;
}

text {
  text-anchor: middle;
  length-adjust: spacing;
  font-weight: bold;
}

#rays > path { 
  fill: hsl(120, 75%, 50%);
}

#rays > path:nth-child(1) { animation: opac 1s linear .05s infinite; }
#rays > path:nth-child(3) { animation: opac 1s linear .15s infinite; }
#rays > path:nth-child(5) { animation: opac 1s linear .25s infinite; }
#rays > path:nth-child(7) { animation: opac 1s linear .35s infinite; }
#rays > path:nth-child(9) { animation: opac 1s linear .45s infinite; }
#rays > path:nth-child(11) { animation: opac 1s linear .55s infinite; }
#rays > path:nth-child(13) { animation: opac 1s linear .65s infinite; }
#rays > path:nth-child(15) { animation: opac 1s linear .75s infinite; }
#rays > path:nth-child(17) { animation: opac 1s linear .85s infinite; }
#rays > path:nth-child(19) { animation: opac 1s linear .95s infinite; }

@keyframes opac {
  100% { opacity: 0; }
}

#rays > path:nth-child(even) {
  fill: hsl(300, 75%, 35%);
  animation: fillcol 1s steps(4) infinite alternate;
}

@keyframes fillcol {
 100% { fill: hsl(170, 75%, 35%); }
}

aside {
  display: none;
  position: fixed;
  top: 0;
  background-color: hsla(0, 0%, 0%, 0.5);
  color: white;
}
              
            
!

JS

              
                
              
            
!
999px

Console