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="container">
  <section class="showcase first">
    <h1>Laziness</h1>
    <div class="code">
      <div class="virtue laziness">L</div>
      <div class="virtue laziness">a</div>
      <div class="virtue laziness">z</div>
      <div class="virtue laziness">i</div>
      <div class="virtue laziness">n</div>
      <div class="virtue laziness">e</div>
      <div class="virtue laziness">s</div>
      <div class="virtue laziness">s</div>
    </div>
    <div class="wall"></div>
  </section>
  <div class="quote">
  The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don't have to answer so many questions about it.
  </div>
  <section class="showcase second">
    <h1>Impatience</h1>
    <div class="code">
      <div class="virtue impatience">I</div>
      <div class="virtue impatience">m</div>
      <div class="virtue impatience">p</div>
      <div class="virtue impatience">a</div>
      <div class="virtue impatience">t</div>
      <div class="virtue impatience">i</div>
      <div class="virtue impatience">e</div>
      <div class="virtue impatience">n</div>
      <div class="virtue impatience">c</div>
      <div class="virtue impatience">e</div>
    </div>
    <div class="wall"></div>
  </section>
  <div class="quote">
  The anger you feel when the computer is being lazy. This makes you write programs that don't just react to your needs, but actually anticipate them. Or at least pretend to.
  </div>
  <section class="showcase third">
    <h1>Hubris</h1>
    <div class="wall"></div>
  </section>
  <div class="quote">
  The quality that makes you write (and maintain) programs that other people won't want to say bad things about.
  </div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=VT323|Notable');

$dark: #201f1d;
$white: #fcf9f3;
$green: #3aee3a;

$verdana: 'Notable', verdana;
$arial: 'VT323', arial;

body {
  background: $dark;
}

.container {
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 20px;
}

.showcase {
  width: 600px;
  height: 200px;
  border: solid 2px $green;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}


h1 {
  font-family: $verdana;
  font-size: 80px;
  position: absolute;
  color: $white;
  text-shadow: 5px 5px 2px rgba(0, 0, 0, 0.5);
}
.first > h1 {
  animation: appear-left 1s linear 1;
  animation-fill-mode: forwards;
  animation-delay: 6s;
  left: 600px;
}
.second > h1 {
  animation: appear-down 1s linear 1;
  animation-fill-mode: forwards;
  animation-delay: 6s;
  top: -200px;
}
.third > h1 {
  animation: scale-down 6s steps(6) 1;
  animation-fill-mode: forwards;
}

.first > .code {
  position: absolute;
  top: 0px;
  left: 100px;
  animation: move-right 1s linear 1;
  animation-fill-mode: forwards;
  animation-delay: 5s;
}
.second > .code {
  position: absolute;
  top: 0px;
  left: 0px;
  animation: move-up 1s linear 1 ;
  animation-fill-mode: forwards;
  animation-delay: 5s;
}

.wall {
  background: repeating-linear-gradient(
    45deg, 
    $dark,
    $dark 10px,
    $green 10px,
    $green 20px
  );
}
.first > .wall {
  position: absolute;
  top: 0px;
  left: 0px;
  height: 200px;
  width: 100px;
  border-radius: 5px;
  animation: wipe-h 2s linear 1;
  animation-delay: 5s;
}
.second > .wall {
  position: absolute;
  top: 150px;
  left: 0px;
  width: 600px;
  height: 100px;
  border-radius: 5px;
  animation: wipe-v 2s linear 1 ;
  animation-delay: 5s;
}
.third > .wall {
  position: absolute;
  top: 0px;
  left: 600px;
  width: 200px;
  height: 200px;
  border-radius: 5px;
  animation: appear-right 1s linear 1 ;
  animation-fill-mode: forwards;
  animation-delay: 6s;
}

.virtue {
  color: $white;
  font-family: $verdana;
  font-size: 80px;
  text-shadow: 5px 5px 2px rgba(0, 0, 0, 0.5);
}

/* animations */
@keyframes move-right {
  0% {
    visibility: visible;
    transform: translateX(0px);
  }
  99% {
    transform: translateX(600px);
  }
  100% {
    transform: translateX(600px);
    visibility: hidden;
  }
}

@keyframes move-up {
  0% {
    visibility: visible;
    transform: translateY(0px);
  }
  99% {
    transform: translateY(-400px);
  }
  100% {
    transform: translateY(-400px);
    visibility: hidden;
  }
}

@keyframes wipe-h {
  0% { transform: translateX(0px); }
  50% { transform: translateX(600px); }
  100% { transform: translateX(0px); }
}
@keyframes wipe-v {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-300px); }
  100% { transform: translateY(0px); }
}

@keyframes scale-down {
  0% { transform: scale(5); }
  100% { transform: scale(1); }
}

@keyframes appear-left {
  0% { transform: translateX(0px); }
  100% { transform: translateX(-500px); }
}
@keyframes appear-right {
  0% { transform: translateX(0px); }
  100% { transform: translateX(-200px); }
}
@keyframes appear-down {
  0% { transform: translateY(0px); }
  100% { transform: translateY(190px); }
}

.laziness, .impatience {
  position: absolute;
  visibility: hidden;
}

@for $i from 1 through 8 {
  .laziness:nth-of-type(#{$i}) {
    color: $white;
    animation-name: mess#{$i};
    animation-duration: 6s;
    animation-iteration-count: 1;
    animation-timing-function: linear;
    transform: rotateZ(random(100)+deg) translateX(50+random(100)+px);
  }

@keyframes mess#{$i} {
  0% { visibility: visible; transform: rotateZ(random(100)+deg) translateX(50+random(100)+px); }
  25% { transform: rotateZ(random(100)+deg) translateX(50+random(100)+px); }
  50% { transform: rotateZ(random(100)+deg) translateX(50+random(100)+px); }
  75% { transform: rotateZ(random(100)+deg) translateX(50+random(100)+px); }
  99% { transform: rotateZ(random(100)+deg) translateX(50+random(100)+px); }
  100% { visibility: hidden; }
  }
}

@for $i from 1 through 10 {
  .impatience:nth-of-type(#{$i}) {
    color: $white;
    animation-name: drop#{$i};
    animation-duration: 1s;
    animation-iteration-count: 6;
    animation-timing-function: linear;
    animation-direction: alternate-reverse;
    transform: translateY(random(100)+px) translateX(#{$i*45}px);
  }
@keyframes drop#{$i} {
  0% { visibility: visible; transform: translateY(random(100)+px) translateX(#{$i*45}px) }
  33% { transform: translateY(random(100)+px) translateX(#{$i*45}px) }
  66% { transform: translateY(random(100)+px) translateX(#{$i*45}px) }
  100% { transform: translateY(random(100)+px) translateX(#{$i*45}px) }
  }
}

.quote {
  width: 600px;
  color: $green;
  font-family: $arial;
  font-size: 24px;
  font-weight: normal;
  bottom: 15px;
  padding: 10px;
  line-height: 110%;
}

              
            
!

JS

              
                // A famous quote from Larry Wall
// http://threevirtues.com/
              
            
!
999px

Console