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

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.

HTML

              
                <h1>GSAP version <span>1.14.1 !</span></h1>
<h2>IE10 preserve-3d GSAP test x,y,z</h2>
<p>borders specially retained for clarity<br>
update - <a href="https://codepen.io/czalexpic/pen/XJbajK" target="_blank">IE10 preserve-3d GSAP test custom rectangle rotation x,y,z</a></p>

<div id="box">
  <div class="box">
    <div class="side6 bottom">6</div>
    <div class="side5 top">5</div>
    <div class="side4 left"><div>4</div></div>
    <div class="side3 right"><div>3</div></div>
    <div class="side2 back">2</div>
    <div class="side1 front">1</div>
  </div>
</div>
              
            
!

CSS

              
                body {
      background-color: #888;
      color: #FFF;
    }

	h1 span {
    color: #f00;
  }

a {
  color: #fff;
}
a:hover {
  text-decoration: none;
}

    h2 {
      color: #FFF;
    }

    #box {
      width: 100px;
      margin: 100px;
    }

    .box {
      width: 100px;
      height: 100px;
      margin: 30px auto;
      position: relative;
    }

    .box div {
      position: absolute;
      text-align: center;
      left: 0;
      top: 0;
      line-height: 100px;
      font-weight: bold;
      font-size: 40px;
      width: 100px;
      height: 100px;
      color: #111;
      /*transform-origin: 50% 50% -50px;*/
      border: 1px solid #666;
    }

    .box .side1 {
      background: hsla(0, 100%, 50%, 0.7);
    }

    .box .side2 {
      background: hsla(60, 100%, 50%, 0.7);
    }

    .box .side3 {
      /*background: hsla(120, 100%, 50%, 0.7);*/
    }

    .box .side3 div {
      position: absolute;
      top: 0;
      left: 0;
      width: 100px;
      height: 100px;
      overflow: hidden;
      background: hsla(120, 100%, 50%, 0.7);
    }

    .box .side4 {
      /*background: hsla(180, 100%, 50%, 0.7);*/
    }

    .box .side4 div {
      position: absolute;
      top: 0;
      left: 0;
      width: 100px;
      height: 100px;
      overflow: hidden;
      background: hsla(180, 100%, 50%, 0.7);
    }

    .box .side5 {
      background: hsla(240, 100%, 50%, 0.7);
    }

    .box .side6 {
      background: hsla(300, 100%, 50%, 0.7);
    }
              
            
!

JS

              
                var ie = (!!navigator.userAgent.match(/Trident\/7\./)) ? 0.5 : 1,
      perspective = 1000;

    new TimelineMax()
      .set($("#box"), {perspective: perspective * ie})
      .set($(".box"), {transformStyle: "preserve-3d"})
      .set($(".box div"), {transformOrigin: "50% 50% -50px", transformPerspective: perspective * ie})
      .set($(".back"), {rotationY: 180})
      .set($(".right"), {rotationY: 270})
      .set($(".left"), {rotationY: 90})
      .set($(".top"), {rotationX: 90})
      .set($(".bottom"), {rotationX: 270});

    new TimelineMax({repeat: -1})
      .insert(new TimelineMax()
        .to($(".front"), 5, {rotationX: '+=360', ease: Linear.easeNone})
    )
      .insert(new TimelineMax()
        .to($(".back"), 5, {rotationX: '-=360', ease: Linear.easeNone})
    )
      .insert(new TimelineMax()
        .to($(".top"), 5, {rotationX: '+=360', ease: Linear.easeNone})
    )
      .insert(new TimelineMax()
        .to($(".bottom"), 5, {rotationX: '+=360', ease: Linear.easeNone})
    )
      .insert(new TimelineMax()
        .to($(".left div"), 5, {rotationZ: '+=360', ease: Linear.easeNone})
    )
      .insert(new TimelineMax()
        .to($(".right div"), 5, {rotationZ: '-=360', ease: Linear.easeNone})
    );

    new TimelineMax({repeat: -1})
      //.staggerTo($(".box > div"), 5, {rotationY: '+=360', ease: Linear.easeNone})
      //.staggerTo($(".box > div"), 5, {rotationZ: '+=360', ease: Linear.easeNone}, 0, '-=5');
              
            
!
999px

Console