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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import or require. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              .box3d
 .p1
 .p2
 .p3
 .p4
 .p5
 .p6
            
          
!
            
              @import "compass/css3";

// fork of https://www.cssplay.co.uk/menu/cssplay-3d-cube-animation-for-ie10.html - CSS play - 3D Animated Cube for Internet Explorer IE10, Firefox, Safari and Chrome

// most all of the code below is from the above url except where noted - the main thing is this css3d works in IE10 and most or all modern browsers

// just wanted to make a reference/playground for testing  IE10 / cross browser css 3d code - and start tweaking it to see what tweaks might be possible to the above code - this will probably change over time and be a bit of a mess too

// this code works around IE10 not supporting preserve-3d which is one of the major issues for css3d - see:
// https://msdn.microsoft.com/en-us/library/ie/hh673529(v=vs.85).aspx#the_ms_transform_style_property

//  prefixfree + normalize enabled
// looks ok in
// win7/IE10/chrome/ff 
// osx m lion safari 6
// ios ipad 6 3rd (works but edges dont meet as correctly, same effect seen in original cssplay code also)
//ubuntu chromium/ff (? perspective + slight jagged lines, but ok)

// todo: some links to check next time
//http://css-3d.org/space-cube-2.htm - doesn't work in ie10 but do edges meet correctly in ipad?
//  https://blog.joelambert.co.uk/2011/05/10/handling-3d-geometry-with-3d-css3-transforms/
// http://hakim.se/experiments/css/holobox/
//https://codepen.io/thebabydino/pen/tbwsc

body {background-color: #333; }

.box3d {width:200px; height:200px; margin:100px auto; position:relative;
 -webkit-transform-style:preserve-3d;
}
.box3d div {position:absolute; left:0; top:0; width:200px; height:200px;
// -webkit-backface-visibility: hidden; 
// -webkit-transform-origin:50% 50% -100px;
opacity: 0.5;
// backface-visibility: hidden; 
transform-origin:50% 50% -100px;
}
// swapped original colors for these https://codepen.io/sacha/pen/wsaEI
.p1 {background: #4cadeb; 
	transform: perspective(600px) rotateX(0deg) rotateY(90deg) rotateZ(0deg);
animation:spin1 10s infinite linear;
}
.p2 {background:#7ac2f0; 
animation:spin2 10s infinite linear;
}
.p3 {background:#a8d7f5; 
animation:spin3 10s infinite linear;
}
.p4 {background:#eb8a4c; 
animation:spin4 10s infinite linear;
}
.p5 {background:#f0a87a; 
animation:spin5 10s infinite linear;
}
.p6 {background:#9b9b9b; 
animation:spin6 10s infinite linear;
}

//******************************
/* for Safari and Chrome */
// @-webkit-keyframes spin1 {
// 0% {-webkit-transform: perspective(600px) rotateX(0deg) rotateY(90deg) rotateZ(0deg);}
// 100% {-webkit-transform: perspective(600px) rotateX(360deg) rotateY(450deg) rotateZ(0deg);}
// }
// @-webkit-keyframes spin2 {
// 0% {-webkit-transform:perspective(600px) rotateX(0deg) rotateY(270deg) rotateZ(0deg);}
// 100% {-webkit-transform:perspective(600px) rotateX(360deg) rotateY(630deg) rotateZ(0deg);}
// }
// @-webkit-keyframes spin3 {
// 0% {-webkit-transform:perspective(600px) rotateX(90deg) rotateY(0deg) rotateZ(0deg);}
// 100% {-webkit-transform:perspective(600px) rotateX(450deg) rotateY(0deg) rotateZ(-360deg);}
// }
// @-webkit-keyframes spin4 {
// 0% {-webkit-transform:perspective(600px)  rotateX(-90deg) rotateY(0deg) rotateZ(0deg);}
// 100% {-webkit-transform:perspective(600px) rotateX(270deg) rotateY(0deg) rotateZ(360deg);}
// }
// @-webkit-keyframes spin5 {
// 0% {-webkit-transform:perspective(600px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);}
// 100% {-webkit-transform:perspective(600px) rotateX(360deg) rotateY(360deg) rotateZ(0deg);}
// }
// @-webkit-keyframes spin6 {
// 0% {-webkit-transform:perspective(600px)  rotateX(0deg) rotateY(180deg) rotateZ(0deg);}
// 100% {-webkit-transform:perspective(600px) rotateX(360deg)  rotateY(540deg) rotateZ(0deg);}
// }
//******************************

/* for IE10 and Firefox */ // current webkit seems happy with this code too so I commented out the /* for Safari and Chrome */ section for now 
@keyframes spin1 {
//0% {transform: perspective(600px) rotateX(0deg) rotateY(90deg) rotateZ(0deg);} // changed this one to put the 0% above, still works
to {transform: perspective(600px) rotateX(360deg) rotateY(450deg) rotateZ(0deg);}
}
@keyframes spin2 {
0% {transform:perspective(600px) rotateX(0deg) rotateY(270deg) rotateZ(0deg);}
100% {transform:perspective(600px) rotateX(360deg) rotateY(630deg) rotateZ(0deg);}
}
@keyframes spin3 {
0% {transform:perspective(600px) rotateX(90deg) rotateY(0deg) rotateZ(0deg);}
100% {transform:perspective(600px) rotateX(450deg) rotateY(0deg) rotateZ(-360deg);}
}
@keyframes spin4 {
0% {transform:perspective(600px)  rotateX(-90deg) rotateY(0deg) rotateZ(0deg);}
100% {transform:perspective(600px) rotateX(270deg) rotateY(0deg) rotateZ(360deg);}
}
@keyframes spin5 {
0% {transform:perspective(600px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);}
100% {transform:perspective(600px) rotateX(360deg) rotateY(360deg) rotateZ(0deg);}
}
@keyframes spin6 {
0% {transform:perspective(600px)  rotateX(0deg) rotateY(180deg) rotateZ(0deg);}
100% {transform:perspective(600px) rotateX(360deg)  rotateY(540deg) rotateZ(0deg);}
}


            
          
!
999px

Console