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

              
                <div class="eiffel-tower">
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s"></div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s">
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s"></div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s"></div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s"></div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s">
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s"></div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="s">
    <div class="s">
      <div class="s">
        <div class="s">
          <div class="s">
            <div class="s">
              <div class="s">
                <div class="s">
                  <div class="s">
                    <div class="s">
                      <div class="s">
                        <div class="s">
                          <div class="s">
                            <div class="s">
                              <div class="s">
                                <div class="s">
                                  <div class="s">
                                    <div class="s">
                                      <div class="s">
                                        <div class="s">
                                          <div class="s">
                                            <div class="s">
                                              <div class="s">
                                                <div class="s">
                                                  <div class="s"></div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="d">
    <div class="d-a"></div>
    <div class="d-b"></div>
  </div>
  <div class="d">
    <div class="d-a"></div>
    <div class="d-b"></div>
    <div class="arc"></div>
    <div class="arc"></div>
  </div>
</div>
<div class="peace">
  #peaceforparis
  <a href="http://www.ifrc.org/en/get-involved/donate/" target="_blank" class="donate">Donate to the French Red Cross</a>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Lato:100,300);

$s-size: 1rem;
$s-rotation: 0.8deg;
$circle-size: $s-size * 20;

$color-red: rgba(red, 0.4);
$color-blue: rgba(blue, 0.4);

.donate {
  display: block;
  font-size: 1rem;
  font-weight: 300;
  text-decoration: none;
  color: blue !important;
  margin-top: 0.25rem;
}

body:before, body:after {
  content: '';
  position: absolute;
  width: $circle-size;
  height: $circle-size;
  top: calc(50% - #{$circle-size / 2});
  left: calc(50% - #{$circle-size / 2});
  border-radius: 50%;
}

body:before {
  animation: peace-red 5s linear infinite;
}

body:after {
  animation: peace-blue 5s 2.5s linear infinite;
}

.peace {
  position: absolute;
  width: 100%;
  text-align: center;
  left: 0;
  top: calc(50% + #{$circle-size / 2});
  font-family: Lato, sans-serif;
  font-size: 3rem;
  margin-top: 2rem;
  font-weight: 100;
}

@keyframes peace-red {
  from {
    transform: rotate(0deg);
  }
  50% {
    box-shadow: 0 2px 8px $color-red;
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes peace-blue {
  from {
    transform: rotate(0deg);
  }
  50% {
    box-shadow: 0 2px 8px $color-blue;
  }
  to {
    transform: rotate(360deg);
  }
}

.eiffel-tower {
  width: $s-size;
  height: $s-size * 26;
  transform: rotate(2deg);
  transform-style: preserve-3d;
  animation: rotate 10s linear infinite;
  
  &:before, &:after {
    position: absolute;
    content: '';
    height: $s-size * 2;
    width: 2px;
    background: black;
    bottom: 100%;
    left: calc(50% - 1px);
    transform: rotateY(35deg);
  }
  
  &:after {
    transform: rotateY(135deg);
  }
  
  > .s {
    top: 0;
    
    &:nth-child(1) {
      transform: rotateY(0deg) translateZ(-$s-size / 1.5) translateX(-$s-size / 6);
    }
    
    &:nth-child(2) {
      transform: rotateY(90deg) translateZ(-$s-size / 1.5) translateX(-$s-size / 6);
    }
    
    &:nth-child(3) {
      transform: rotateY(180deg) translateZ(-$s-size / 1.5) translateX(-$s-size / 6);
    }
    
    &:nth-child(4) {
      transform: rotateY(270deg) translateZ(-$s-size / 1.5) translateX(-$s-size / 6);
    }
    
    &:nth-child(5) {
      transform: rotateY(0deg) translateZ(-$s-size / 1.5) translateX($s-size / 6);
    }
    
    &:nth-child(6) {
      transform: rotateY(90deg) translateZ(-$s-size / 1.5) translateX($s-size / 6);
    }
    
    &:nth-child(7) {
      transform: rotateY(180deg) translateZ(-$s-size / 1.5) translateX($s-size / 6);
    }
    
    &:nth-child(8) {
      transform: rotateY(270deg) translateZ(-$s-size / 1.5) translateX($s-size / 6);
    }
    
    .s {
      transform: rotateX(-$s-rotation) skewX(-$s-rotation);
    }
    
    &:nth-child(n + 5) .s {
      transform: rotateX(-$s-rotation) skewX($s-rotation);
    }
  }
}

@keyframes rotate {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

.s {
  width: $s-size;
  height: $s-size;
  border: 1px solid black;
  position: absolute;
  top: 100%;
  left: -1px;
  transform-style: preserve-3d;
  background:
    linear-gradient(45deg, transparent, transparent 45%, black 50%, transparent 55%, transparent),
    linear-gradient(-45deg, transparent, transparent 45%, black 50%, transparent 55%, transparent),
    linear-gradient(90deg, transparent, transparent 45%, black 50%, transparent 55%);
  
  &:before, &:after {
    content: '';
    position: absolute;
    height: 100%;
    width: $s-size;
  }
}

.d {
  transform-style: preserve-3d;
  position: absolute;
  height: $s-size * 4;
  width: $s-size * 4;
  left: -$s-size * 2 + $s-size / 2;
  transform-origin: center center;
  
  > .d-a, > .d-b, > .arc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    
    &:before, &:after {
      content: '';
      display: block;
      height: $s-size * 1.5;
      width: 100%;
      position: absolute;
      top: 0;
      left: 0;
      transform-origin: top;
      transform: rotateX(90deg);
      border: 1px solid black;
      transform-style: preserve-3d;
      background:
        repeating-linear-gradient(90deg, transparent, transparent 3%, black 4%),
        linear-gradient(transparent, transparent 50%, black 51%, black 64%, transparent 65%, transparent 80%, black 81%, transparent 83%),
        repeating-linear-gradient(45deg, transparent, transparent 6%, black 7%, transparent 8%),
        repeating-linear-gradient(-45deg, transparent, transparent 6%, black 7%, transparent 8%)
    }
    
    &:after {
      top: 100%;
    }
  }
  
  transform:
    rotateX(90deg)
    translateZ(-12rem);
  
  + .d {
    height: $s-size * 7;
    width: $s-size * 7;
    left: -$s-size * 3.5 + $s-size / 2;
    transform:
      rotateX(90deg)
      translateZ(-16rem);
  }
  
  > .arc {
    border: none;
    
    &:before, &:after {
      border: none;
      transform: rotateX(-90deg);
      background: radial-gradient(
        ellipse at bottom center,
        transparent,
        transparent 55%,
        black 56%,
        transparent 58%,
        transparent 60%,
        black 61%,
        transparent 63%
      );
    }
  }
}

.d-b, .arc + .arc {
  transform: rotateZ(90deg);
}

body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  background: #F7F7F7;
  overflow-y: auto;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  transform-style: preserve-3d;
  perspective: 1000;
}

*, *:before, *:after {
  box-sizing: border-box;
  position: relative;
}
              
            
!

JS

              
                
              
            
!
999px

Console