Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

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


Auto Save

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="codepen">
  <div class="face front"></div>
  <div class="face back"></div>
  <div class="face top"></div>
  <div class="face bottom"></div>
  <div class="face left"></div>
  <div class="face right"></div>


                cWidth = 106px/1.3
cHeight = 66px/1.3
cBorder = 9px/1.3
cShadow = 7px/1.3
cRadius = 4px
cColorFg = #fff
cColorBg = #000
cRotateX = -43deg
cRotateY = -45deg
cDuration = 3s
cDelay = 2s
cTiming = ease-in-out

@keyframes cRotate
    transform rotateX(cRotateX) rotateY(cRotateY)
    transform rotateX(cRotateX) rotateY(cRotateY + 360deg)
    transform rotateX(cRotateX - 180deg) rotateY(cRotateY + 360deg)

  box-sizing border-box
  width 100vw
  height 100vh
  display flex
  align-items center
  justify-content center
  background-color cColorBg
  position relative
  width cWidth
  height cHeight
  transform-style preserve-3d
  transform rotateX(cRotateX) rotateY(cRotateY)
  animation cRotate cDuration forwards cTiming infinite cDelay
  position absolute
  width inherit
  height inherit
  border-radius cRadius
  border cBorder solid cColorFg
  box-shadow 0 0 0 cShadow cColorFg
  background-color transparent
    transform translate3d(0, 0, cWidth/2)
    transform rotateY(180deg) translate3d(0, 0, cWidth/2)
    transform rotateY(-90deg) translate3d(0, 0, cWidth/2)
    transform rotateY(90deg) translate3d(0, 0, cWidth/2)
    width cWidth
    height cWidth
    transform rotateX(90deg) translate3d(0, 0, cWidth/2)
    width cWidth
    height cWidth
    bottom 0
    transform: rotateX(-90deg) translate3d(0, 0, cWidth/2)