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 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='view'>
  <div class='parallaxItem parallaxL1'>
  <div class='parallaxItem parallaxL2'>
  <div class='parallaxItem parallaxL1'>
  <div class='parallaxItem parallaxL2'>
  <div class='parallaxItem parallaxL1'>


                body {
  margin: 0;
  padding: 0;

.view {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  perspective-origin: 49.5% 50%;
  perspective: 1px;
  position: relative;

.parallaxItem {
  height: 80vh;
  width: 100%;
  position: relative;

.parallaxL1 {
  transform: translateZ(0px) scaleX(1);
  /* each block stacks according to their order in the
     source. With the 1st block that appears in the code
     being placed at the bottom of the stack and subsequent
     blocks being stacked one on top of the other. Use
     z-index to stack the blocks in the order you want.
     Remember that z-index can only work of relative or
     absolute positioned blocks.*/
  z-index: 2000;
  background-color: red;
  opacity: 0.7;
  /*border: solid;*/

.parallaxL2 {
  transform-origin: center center;
  /*if a scroll bar appears on the bottom of the screen its
    because one of the parallax blocks are too large for the
    viewport element. adjust the "scaleX" for the parallax
    block until the entire block fits on the screen and the
    scroll bar disappears. This adjustment may result it a
    slight space on the left side of block. Gradually reduce
    the "perspective-origin" x value on the viewport element
    until the white space disappears. (Note: you can use
    fractional percentages i.e. 49.99%). Or you could apply
    negative left-marging to the parallax block to gradually
    reduce this space.
    margin-left: -7px;
  transform: scaleX(1.5) scaleY(1.7) translateZ(-0.5px);
  z-index: 1000;
  be careful with borders as the will add to the size of your
  block. This can cause the block to grow larger than the
  viewport item width, resulting in a scroll bar appearing at
  the bottom of the screen. One way to remedy this is to set
  "box-sizing" to "border-box". Or make sure to account for
  the size of your borders on both sides when setting your
  block size.
  box-sizing: border-box;
  border: solid;
  border-color: green;*/
  background-color: yellow;