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

+ add another resource


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


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.


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.


                <div class="container">
<input type="checkbox" class="indicator" id="part1-input">
<label for="part1-input" class="part part1 left top"><h1>Of</h1></label>
<input type="checkbox" class="indicator" id="part2-input">
<label for="part2-input" class="part part2 center top"><h1>course</h1></label>
<input type="checkbox" class="indicator" id="part3-input">
<label for="part3-input" class="part part3 right top"><h1>you</h1></label>
<input type="checkbox" class="indicator" id="part4-input">
<label for="part4-input" class="part part4 left middle"><h1>could</h1></label>
<input type="checkbox" class="indicator" id="part5-input">
<label for="part5-input" class="part part5 center middle"><h1>put</h1></label>
<input type="checkbox" class="indicator" id="part6-input">
<label for="part6-input" class="part part6 right middle"><h1>anything</h1></label>
<input type="checkbox" class="indicator" id="part7-input">
<label for="part7-input" class="part part7 left bottom"><h1>else</h1></label>
<input type="checkbox" class="indicator" id="part8-input">
<label for="part8-input" class="part part8 center bottom"><h1>in</h1></label>
<input type="checkbox" class="indicator" id="part9-input">
<label for="part9-input" class="part part9 right bottom"><h1>here</h1></label>


                /* Setup */
$transitionDuration: .5s;

* {box-sizing: border-box;}
body {margin: 0; padding: 0; overflow: hidden;}

.container {
  height: 100%;
  width: 100%;
  margin: 0 auto;

/* Make boxes fit in the container */
.part {
  z-index: 1;
  position: absolute;
  width: 100%;
  height: 100%;
  transform: scale(.33333);
  transition: top $transitionDuration,
              left $transitionDuration,
              bottom $transitionDuration,
              right $transitionDuration,
              transform $transitionDuration,
              z-index $transitionDuration step-end;

/* Make boxes grow (with delay for reaching the middle box and fixing z-index overflow) */
/*.part:hover {*/

.indicator:checked + .part {
  height: 100%;
  width: 100%;
  transform: scale(1);
  z-index: 2;
  transition: top $transitionDuration,
              left $transitionDuration,
              bottom $transitionDuration,
              right $transitionDuration,
              transform $transitionDuration,
              z-index $transitionDuration step-start;

  h1 {
    font-size: 20vw;
    transition: font-size $transitionDuration;

/* Absolute box positioning */
.top {top: -33.33333%;}
.indicator:checked + .top {top: 0%;}
.bottom {bottom: -33.33333%;}
.indicator:checked + .bottom {bottom: 0;}
.left {left: -33.33333%;}
.indicator:checked + .left {left: 0;}
.right {right: -33.33333%;}
.indicator:checked + .right {right: 0;}

.indicator {
  display: none;

/* For dummy text only */
.part {
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  h1 {
    flex: 0 0 auto;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12vw;
    color: white;
    transition: font-size $transitionDuration;

/* Only for the looks */
.part1 {background: #ECD078;}
.part2 {background: #D95B43;}
.part3 {background: #C02942;}
.part4 {background: #542437;}
.part5 {background: #53777A;}
.part6 {background: #FF3D7F;}
.part7 {background: #FF9E9D;}
.part8 {background: #DAD8A7;}
.part9 {background: #3FB8AF;}