Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div class="container">
  <div class="cube">
    <div class="face front">
      @minimalmonkey
      <a href="https://twitter.com/minimalmonkey" class="twitter-follow-button" data-show-count="false">Follow @minimalmonkey</a>
      <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    </div>
    <div class="face top">CSS3</div>
    <div class="face back">NO JS</div>
    <div class="face bottom">YEAH!</div>
  </div>
</div>
              
            
!

CSS

              
                @import compass

body, html
  font-family: Helvetica, Arial, sans-serif
  font-size: 100px
  font-weight: 900
  margin: 0
  padding: 0

.container
  -webkit-perspective: 1000
  margin-top: -70px
  position: absolute
  top: 50%

.cube
  -webkit-animation: spin 6s 0 infinite
  -moz-animation: spin 6s 0 infinite
  animation: spin 6s 0 infinite
  position: relative
  +transform-style(preserve-3d)

.container, .face
  height: 140px
  width: 100%

.face
  +backface-visibility(hidden)
  left: 0
  line-height: 140px
  overflow: hidden
  position: absolute
  text-align: center
  +transition(color 0.1s)
  top: 0

.front
  color: #a2c5bf
  font-size: 40px
  line-height: 90px
  z-index: 2
  
  iframe
    display: block
    margin: 0 auto

.top
  color: #e8846b
  +transform(rotateX(90deg) translateY(-70px) translateZ(70px))

.back
  color: #16528e
  +transform(rotateX(180deg) translateY(0px) translateZ(140px))

.bottom
  color: #e54b4b
  +transform(rotateX(270deg) translateY(70px) translateZ(70px))

  

@-webkit-keyframes spin
  0% 
    //front
    +transform(rotateX(-360deg) translateZ(0px) translateY(0px))
  26% 
    //front
    +transform(rotateX(-360deg) translateZ(0px) translateY(0px))
  34% 
    //top
    +transform(rotateX(-90deg) translateZ(140px))
  48% 
    //top
    +transform(rotateX(-90deg) translateZ(140px))
  56% 
    //back
    +transform(rotateX(-180deg) translateZ(140px) translateY(-140px))
  70% 
    //back
    +transform(rotateX(-180deg) translateZ(140px) translateY(-140px))
  78% 
    //bottom
    +transform(rotateX(-270deg) translateZ(0px) translateY(-140px))
  92% 
    //bottom
    +transform(rotateX(-270deg) translateZ(0px) translateY(-140px))
  100% 
    //front
    +transform(rotateX(-360deg) translateZ(0px) translateY(0px))
              
            
!

JS

              
                // NO JAVASCRIPT
              
            
!
999px

Console