Pen Settings



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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


                <div class="Header">
  <svg class="Header__svg" xmlns="" viewBox="0 0 1337.97 684.43">
    <path class="Header__shape bigSquare" fill="#16d5d1" d="M546.519 349.271l86.383-56.098 56.097 86.383-86.383 56.098z"/>
    <path class="Header__shape triangle" fill="none" stroke="#ff4676" stroke-width="8" d="M372.15 462.17L321 434.58l-4.88 56.16z"/>
    <circle class="Header__shape bigCircle" fill="#ff4676" cx="1076.52" cy="262.17" r="59"/>
    <path class="Header__shape littleSquare" fill="#ffe430" d="M285.523 262.61l12.372-53.59 53.59 12.372-12.372 53.59z"/>
    <circle class="Header__shape hoop" fill="none" stroke="#ffe430" stroke-width="13" cx="905.52" cy="447.17" r="45"/>
    <circle class="Header__shape littleCircle" fill="#0f1c70"cx="1036.52" cy="203.17" r="27"/>
  <h3 class="Header__title">Transform-box:fill-box</h3>


                 // I was rotating an SVG shape within a larger SVG when I noticed that the shape was taking the center of the SVG canvas as the origin of the transformation rather than its own center. To fix this add transform-box: fill-box to the shape you're rotating.

.Header__shape {
  animation-duration: 4s;
  animation-timing-function: cubic-bezier(.18,1.17,.03,1.46);
  animation-fill-mode: backwards;
  transform-origin: center;
  // this here is the good stuff
  transform-box: fill-box;

// aaand the rest of the code

body {
  background: radial-gradient(#c2c2c2 8%, transparent 8%), white;
  background-position: 0 0, 25px 25px;
  background-size:25px 25px;
  min-height: 100vh;

.Header {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;

.Header__svg {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  will-change: transform;
.Header__title {
  font-family: Avenir, Futura, 'Open Sans', 'Gill Sans', 'Helvetica Neue', Ariel, sans-serif;
  font-weight: bold;
  font-size: 6vw;
  margin: 0;

.bigSquare {
  animation-name: bigSquare;
@keyframes bigSquare {
  from { transform: translateY(10%) rotate(-80deg) scale(0); }
  to { transform: translateY(0) rotate(0deg) scale(1); }
.littleSquare {
  animation-name: littleSquare;
@keyframes littleSquare {
  from { transform: translate(226%, 183%) rotate(140deg) scale(0) ; }
  to { transform: translate(0%, 0%) rotate(0deg) scale(1); }
.triangle {
  animation-name: triangle;
@keyframes triangle {
  from { transform: rotate(-140deg) scale(0) ; }
  to { transform: rotate(0deg) scale(1); }
.hoop {
  animation-name: hoop;
@keyframes hoop {
  from { transform: translate(-160%, -33%) scale(0) ; }
  to { transform: translate(0%, 0%) scale(1); }
.bigCircle {
  animation-name: bigCircle;
@keyframes bigCircle {
  from { transform: scale(0) translate(60%, 3%); }
  to { transform: scale(1) translate(0%, 0%); }
.littleCircle {
  animation-name: littleCircle;
@keyframes littleCircle {
  from { transform: scale(0) }
  to { transform: scale(1) }

// some lovely sass fun to stagger the animation

@for $i from 1 to 12 {
  .Header__shape:nth-child(#{$i}) { 
    animation-delay: $i * 0.16s;