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 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

Packages

Add Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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="canvas">
  <div class="notepad">
    <div class="cover">
    </div>
    <div class="page one">
      <p>Hello<br />World!</p>
    </div>
    <div class="page two"></div>
    <div class="page three"></div>
    <div class="page four"></div>
  </div>
  <div class="pencil">
    <div class="edge"></div>
  </div>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Indie+Flower');
body {
  margin: 0;
  padding: 0;
  background-color: #618b9e;
  font-family: 'Indie Flower', cursive, sans-serif;
}

.canvas {
  width: 100vw;
  height: 100vw;
  max-width: 250px;
  max-height: 250px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.notepad {
  position: relative;
  width: 200px;
  height: 250px;
  perspective: 1000px;
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12), 0 2px 4px -1px rgba(0, 0, 0, .2);
}

.notepad .cover,
.notepad .page {
  position: absolute;
  width: 100%;
  height: 100%;
  text-align: center;
}

.notepad .cover {
  background: linear-gradient(to right, #24374a 10%, #33495f 10%);
  transform-origin: left center;
  transition: 2s;
  z-index: 20;
  animation: flip 6s infinite ease-in-out;
}

.notepad .cover:before {
  content: '';
  position: absolute;
  top: 15%;
  left: 35%;
  width: 40%;
  height: 20%;
  background-color: #455d75;
  animation: title 6s infinite ease-in-out;
}

.notepad .cover:after {
  content: '';
  position: absolute;
  top: 43%;
  left: 38%;
  width: 34%;
  height: 5%;
  background-color: #455d75;
  animation: title 6s infinite ease-in-out;
}

.notepad .page {
  background: #eee;
  border-right: 1px solid #ccc;
  box-sizing: border-box;
}

.notepad .page:after {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  width: 90%;
  height: 100%;
  background: linear-gradient( #eee 0%, #eee 10%, #dfdfdf 10%, #dfdfdf 11%, #eee 11%, #eee 20%, #dfdfdf 20%, #dfdfdf 21%, #eee 21%, #eee 30%, #dfdfdf 30%, #dfdfdf 31%, #eee 31%, #eee 40%, #dfdfdf 40%, #dfdfdf 41%, #eee 41%, #eee 50%, #dfdfdf 50%, #dfdfdf 51%, #eee 51%, #eee 60%, #dfdfdf 60%, #dfdfdf 61%, #eee 61%, #eee 70%, #dfdfdf 70%, #dfdfdf 71%, #eee 71%, #eee 80%, #dfdfdf 80%, #dfdfdf 81%, #eee 81%, #eee 90%, #dfdfdf 90%, #dfdfdf 91%, #eee 91%, #eee 100%);
}

.page p {
  position: absolute;
  top: 18%;
  left: 28%;
  z-index: 2;
  width: 0;
  height: 135px;
  margin: 0;
  font-size: 40px;
  text-align: left;
  overflow: hidden;
  animation: write 6s infinite linear;
}

.page.one {
  z-index: 4;
  animation: one 6s infinite ease-in-out;
}

.page.one:before {
  position: absolute;
}

.page.two {
  z-index: 3;
  animation: two 6s infinite ease-in-out;
}

.page.three {
  z-index: 2;
  animation: three 6s infinite ease-in-out;
}

.page.four {
  z-index: 1;
  border-right-width: 0;
}

.page:before {
  content: '';
  position: absolute;
  right: -7%;
  width: 7%;
  height: 10%;
  border-radius: 0 0 20% 0;
}

.page.one:before {
  top: 10%;
  background-color: #cc881b;
}

.page.two:before {
  top: 20%;
  background-color: #49a84d;
}

.page.three:before {
  top: 30%;
  background-color: #bf351f;
}

.page.four:before {
  top: 40%;
  background-color: #d68384;
}

.pencil {
  position: absolute;
  bottom: 5%;
  right: -5%;
  width: 15%;
  height: 35%;
  border-radius: 10% 10% 0 0;
  background: linear-gradient(#dd574b 20%, #bbb 20%, #bbb 30%, #e67e22 30%, #e67e22 72%, #ffe0a7 72%, #ffe0a7 85%, transparent 85%);
  overflow: hidden;
  animation: draw 6s infinite ease-out;
}

.pencil:before {
  content: '';
  position: absolute;
  bottom: -10%;
  left: 0;
  border-top: 12px solid #333;
  border-left: 19px solid transparent;
  border-right: 19px solid transparent;
  border-bottom: 10px solid transparent;
}

.pencil:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 85%;
  background-color: rgba(0, 0, 0, .2);
  border-top-right-radius: 20%;
}

.pencil .edge:before {
  content: '';
  position: absolute;
  bottom: 14%;
  left: 0;
  border: 9px solid transparent;
  border-bottom: 4px solid #333;
}

.pencil .edge:after {
  content: '';
  position: absolute;
  bottom: 14%;
  right: 0;
  border: 9px solid transparent;
  border-bottom: 4px solid #333;
  z-index: 2;
}

@keyframes flip {
  0%,
  30%,
  100% {
    transform: rotateY(0deg);
  }
  50%,
  80% {
    transform: rotateY(-150deg);
  }
  80% {
    background: linear-gradient(to right, #1a2938 15%, #1a2938 15%);
  }
}

@keyframes title {
  0%,
  40%,
  90% {
    background-color: #455d75;
  }
  41%,
  89% {
    background-color: transparent;
  }
}

@keyframes draw {
  0%,
  40%,
  88% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(-180px, -180px) rotate(20deg);
  }
  55% {
    transform: translate(-160px, -80px) rotate(20deg);
  }
  60% {
    transform: translate(-140px, -180px) rotate(20deg);
  }
  65% {
    transform: translate(-120px, -80px) rotate(20deg);
  }
  70% {
    transform: translate(-100px, -180px) rotate(20deg);
  }
  75% {
    transform: translate(-80px, -80px) rotate(20deg);
  }
  80% {
    transform: translate(-60px, -180px) rotate(20deg);
  }
}

@keyframes write {
  0%,
  52% {
    width: 0;
  }
  57% {
    width: 20px;
  }
  62% {
    width: 40px;
  }
  68% {
    width: 60px;
  }
  72% {
    width: 80px;
  }
  78%,
  100% {
    width: 120px;
  }
}

@keyframes one {
  0%,
  30%,
  100% {
    width: 100%;
  }
  50%,
  80% {
    width: 97%;
  }
}

@keyframes two {
  0%,
  30%,
  100% {
    width: 100%;
  }
  50%,
  80% {
    width: 98%;
  }
}

@keyframes three {
  0%,
  30%,
  100% {
    width: 100%;
  }
  50%,
  80% {
    width: 99%;
  }
}
            
          
!
999px

Console