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

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

              
                <!-- Please ❤ this and follow me if you like it! -->




























<main class="wrap" role="main">
    <div class="cube">
        <div class="face front"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m0 0h16v16h-16z"/><path d="m0 0h15v15h-15z" fill="#E86010"/><path d="m1 1h14v14h-14z" fill="#FFA048"/><path d="m2 13h1v1h-1z"/><path d="m13 13h1v1h-1z"/><path d="m13 2h1v1h-1z"/><path d="m2 2h1v1h-1z"/><path d="m10 14h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z"/><path d="m9 13h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z" fill="#E86010"/></svg><div class="shade"></div></div>
        <div class="face right"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m0 0h16v16h-16z"/><path d="m0 0h15v15h-15z" fill="#E86010"/><path d="m1 1h14v14h-14z" fill="#FFA048"/><path d="m2 13h1v1h-1z"/><path d="m13 13h1v1h-1z"/><path d="m13 2h1v1h-1z"/><path d="m2 2h1v1h-1z"/><path d="m10 14h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z"/><path d="m9 13h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z" fill="#E86010"/></svg><div class="shade"></div></div>
        <div class="face back"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m0 0h16v16h-16z"/><path d="m0 0h15v15h-15z" fill="#E86010"/><path d="m1 1h14v14h-14z" fill="#FFA048"/><path d="m2 13h1v1h-1z"/><path d="m13 13h1v1h-1z"/><path d="m13 2h1v1h-1z"/><path d="m2 2h1v1h-1z"/><path d="m10 14h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z"/><path d="m9 13h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z" fill="#E86010"/></svg><div class="shade"></div></div>
        <div class="face left"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m0 0h16v16h-16z"/><path d="m0 0h15v15h-15z" fill="#E86010"/><path d="m1 1h14v14h-14z" fill="#FFA048"/><path d="m2 13h1v1h-1z"/><path d="m13 13h1v1h-1z"/><path d="m13 2h1v1h-1z"/><path d="m2 2h1v1h-1z"/><path d="m10 14h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z"/><path d="m9 13h-2v-2h2zm-1-5h-1v2h2v-2h2v-4h-1v-1h-5v1h-1v3h2v-3h3v3h-1z" fill="#E86010"/></svg><div class="shade"></div></div>

        <div class="face top"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m0 0h16v16h-16z"/><path d="m0 0h15v15h-15z" fill="#E86010"/><path d="m1 1h14v14h-14z" fill="#FFA048"/><path d="m2 13h1v1h-1z"/><path d="m13 13h1v1h-1z"/><path d="m13 2h1v1h-1z"/><path d="m2 2h1v1h-1z"/></svg></div>
        <div class="face bottom"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m0 0h16v16h-16z"/><path d="m0 0h15v15h-15z" fill="#E86010"/><path d="m1 1h14v14h-14z" fill="#FFA048"/><path d="m2 13h1v1h-1z"/><path d="m13 13h1v1h-1z"/><path d="m13 2h1v1h-1z"/><path d="m2 2h1v1h-1z"/></svg></div>
    </div>
</main>
              
            
!

CSS

              
                /* Please ❤ this and follow me if you like it! */




























:root,
html {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-ms-box-sizing: border-box;
	-o-box-sizing: border-box;
	box-sizing: border-box;
	font-family: "CircularStd-Medium", "Circular Std Medium", "ProximaNovaA-Semibold", "Proxima Nova Alt Semibold", "ProximaNova-Semibold", "Proxima Nova Semibold", "SF UI Text", "SFUIText-Medium", "San Francisco", "-apple-system-font", ".SFNSText-Medium", "BlinkMacSystemFont", ".HelveticaNeueDeskInterface-Medium", "HelveticaNeue-Medium", "Helvetica Neue Medium", "HelveticaNeue", "Helvetica Neue", "MS Sans Serif", "Helvetica", "Arial", sans-serif;
	font-weight: 500;
	font-smooth: always;
	-webkit-font-smoothing: antialiased;
	-moz-font-smoothing: antialiased;
	-ms-font-smoothing: antialiased;
	-o-font-smoothing: antialiased;
	font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	osx-font-smoothing: grayscale;
	text-rendering: optimizeSpeed;
	-webkit-tap-highlight-color: transparent;
	-moz-tap-highlight-color: transparent;
	-ms-tap-highlight-color: transparent;
	-o-tap-highlight-color: transparent;
	tap-highlight-color: transparent;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
	user-select: none;
}

*,
:after,
:before {
	-webkit-box-sizing: inherit;
	-moz-box-sizing: inherit;
	-ms-box-sizing: inherit;
	-o-box-sizing: inherit;
	box-sizing: inherit;
}

body,
html {
	-webkit-contain: strict;
	-moz-contain: strict;
	-ms-contain: strict;
	-o-contain: strict;
	contain: strict;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	margin: 0;
	padding: 0;
}

body {
	background-color: #ECF0F1;
	background-image: linear-gradient(#ECF0F1, #BDC3C7);
	background-position: 50% 50%;
	background-repeat: no-repeat;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-ms-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}

main {
	position: absolute;
	z-index: 1;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	width: 40vmin;
	height: 40vmin;
	margin: auto;
	-webkit-perspective: 100vmin;
	-moz-perspective: 100vmin;
	-ms-perspective: 100vmin;
	-o-perspective: 100vmin;
	perspective: 100vmin;
	-webkit-perspective-origin: 20vmin 20vmin;
	-moz-perspective-origin: 20vmin 20vmin;
	-ms-perspective-origin: 20vmin 20vmin;
	-o-perspective-origin: 20vmin 20vmin;
	perspective-origin: 20vmin 20vmin;
	-webkit-appearance: none;
	-moz-appearance: none;
	-ms-appearance: none;
	-o-appearance: none;
	appearance: none;
	pointer-events: none;
}

.cube {
	position: relative;
	display: block;
	width: 40vmin;
	height: 40vmin;
	-webkit-transform-style: preserve-3d;
	-moz-transform-style: preserve-3d;
	-ms-transform-style: preserve-3d;
	-o-transform-style: preserve-3d;
	transform-style: preserve-3d;
	-webkit-animation: spin 5000ms linear infinite;
	-moz-animation: spin 5000ms linear infinite;
	-ms-animation: spin 5000ms linear infinite;
	-o-animation: spin 5000ms linear infinite;
	animation: spin 5000ms linear infinite;
}

.cube:after {
	-webkit-contain: strict;
	-moz-contain: strict;
	-ms-contain: strict;
	-o-contain: strict;
	contain: strict;
	position: absolute;
	top: -.1vmin;
	right: -.1vmin;
	bottom: -.1vmin;
	left: -.1vmin;
	display: block;
	content: " ";
	background-color: rgba(0, 0, 0, .5);
	width: 40.2vmin;
	height: 40.2vmin;
	overflow: hidden;
	-webkit-box-shadow: 0 0 .4vmin #000;
	-moz-box-shadow: 0 0 .4vmin #000;
	-ms-box-shadow: 0 0 .4vmin #000;
	-o-box-shadow: 0 0 .4vmin #000;
	box-shadow: 0 0 .4vmin #000;
	-webkit-transform: rotateX(90deg) translateY(20.1vmin) translateZ(-12.12vmin);
	-moz-transform: rotateX(90deg) translateY(20.1vmin) translateZ(-12.12vmin);
	-ms-transform: rotateX(90deg) translateY(20.1vmin) translateZ(-12.12vmin);
	-o-transform: rotateX(90deg) translateY(20.1vmin) translateZ(-12.12vmin);
	transform: rotateX(90deg) translateY(20.1vmin) translateZ(-12.12vmin);
	-webkit-transform-origin: 20.1vmin 40.2vmin;
	-moz-transform-origin: 20.1vmin 40.2vmin;
	-ms-transform-origin: 20.1vmin 40.2vmin;
	-o-transform-origin: 20.1vmin 40.2vmin;
	transform-origin: 20.1vmin 40.2vmin;
	-webkit-opacity: .2;
	-moz-opacity: .2;
	-ms-opacity: .2;
	-o-opacity: .2;
	opacity: .2;
}

.face,
.shade,
svg {
	-webkit-contain: strict;
	-moz-contain: strict;
	-ms-contain: strict;
	-o-contain: strict;
	contain: strict;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	width: 40vmin;
	height: 40vmin;
	overflow: hidden;
}

svg {
	z-index: 1;
}

.front {
	-webkit-transform: rotateY(0) translateZ(20vmin);
	-moz-transform: rotateY(0) translateZ(20vmin);
	-ms-transform: rotateY(0) translateZ(20vmin);
	-o-transform: rotateY(0) translateZ(20vmin);
	transform: rotateY(0) translateZ(20vmin);
}

.front>.shade {
	-webkit-animation: shade 5000ms -7500ms linear infinite;
	-moz-animation: shade 5000ms -7500ms linear infinite;
	-ms-animation: shade 5000ms -7500ms linear infinite;
	-o-animation: shade 5000ms -7500ms linear infinite;
	animation: shade 5000ms -7500ms linear infinite;
}

.right {
	-webkit-transform: rotateY(-270deg) translateX(20vmin);
	-moz-transform: rotateY(-270deg) translateX(20vmin);
	-ms-transform: rotateY(-270deg) translateX(20vmin);
	-o-transform: rotateY(-270deg) translateX(20vmin);
	transform: rotateY(-270deg) translateX(20vmin);
	-webkit-transform-origin: top right;
	-moz-transform-origin: top right;
	-ms-transform-origin: top right;
	-o-transform-origin: top right;
	transform-origin: top right;
}

.right>.shade {
	-webkit-animation: shade 5000ms -6250ms linear infinite;
	-moz-animation: shade 5000ms -6250ms linear infinite;
	-ms-animation: shade 5000ms -6250ms linear infinite;
	-o-animation: shade 5000ms -6250ms linear infinite;
	animation: shade 5000ms -6250ms linear infinite;
}

.back {
	-webkit-transform: rotateY(180deg) translateZ(20vmin);
	-moz-transform: rotateY(180deg) translateZ(20vmin);
	-ms-transform: rotateY(180deg) translateZ(20vmin);
	-o-transform: rotateY(180deg) translateZ(20vmin);
	transform: rotateY(180deg) translateZ(20vmin);
}

.back>.shade {
	-webkit-animation: shade 5000ms -5000ms linear infinite;
	-moz-animation: shade 5000ms -5000ms linear infinite;
	-ms-animation: shade 5000ms -5000ms linear infinite;
	-o-animation: shade 5000ms -5000ms linear infinite;
	animation: shade 5000ms -5000ms linear infinite;
}

.left {
	-webkit-transform: rotateY(270deg) translateX(-20vmin);
	-moz-transform: rotateY(270deg) translateX(-20vmin);
	-ms-transform: rotateY(270deg) translateX(-20vmin);
	-o-transform: rotateY(270deg) translateX(-20vmin);
	transform: rotateY(270deg) translateX(-20vmin);
	-webkit-transform-origin: center left;
	-moz-transform-origin: center left;
	-ms-transform-origin: center left;
	-o-transform-origin: center left;
	transform-origin: center left;
}

.left>.shade {
	-webkit-animation: shade 5000ms -3750ms linear infinite;
	-moz-animation: shade 5000ms -3750ms linear infinite;
	-ms-animation: shade 5000ms -3750ms linear infinite;
	-o-animation: shade 5000ms -3750ms linear infinite;
	animation: shade 5000ms -3750ms linear infinite;
}

.top {
	-webkit-transform: rotateX(-90deg) translateY(-20vmin);
	-moz-transform: rotateX(-90deg) translateY(-20vmin);
	-ms-transform: rotateX(-90deg) translateY(-20vmin);
	-o-transform: rotateX(-90deg) translateY(-20vmin);
	transform: rotateX(-90deg) translateY(-20vmin);
	-webkit-transform-origin: top center;
	-moz-transform-origin: top center;
	-ms-transform-origin: top center;
	-o-transform-origin: top center;
	transform-origin: top center;
}

.bottom {
	-webkit-transform: rotateX(90deg) translateY(20vmin);
	-moz-transform: rotateX(90deg) translateY(20vmin);
	-ms-transform: rotateX(90deg) translateY(20vmin);
	-o-transform: rotateX(90deg) translateY(20vmin);
	transform: rotateX(90deg) translateY(20vmin);
	-webkit-transform-origin: bottom center;
	-moz-transform-origin: bottom center;
	-ms-transform-origin: bottom center;
	-o-transform-origin: bottom center;
	transform-origin: bottom center;
}

.shade {
    z-index: 9;
    background-color: #000;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-opacity: .00001;
    -moz-opacity: .00001;
    -ms-opacity: .00001;
    -o-opacity: .00001;
    opacity: .00001;
    -webkit-will-change: opacity;
    -moz-will-change: opacity;
    -ms-will-change: opacity;
    -o-will-change: opacity;
    will-change: opacity;
}

@-webkit-keyframes shade {
	0%,
	25%,
	75%,
	100% {
		-webkit-opacity: .99999;
		opacity: .99999;
	}
	50% {
		-webkit-opacity: .00001;
		opacity: .00001;
	}
}

@-moz-keyframes shade {
	0%,
	25%,
	75%,
	100% {
		-moz-opacity: .99999;
		opacity: .99999;
	}
	50% {
		-moz-opacity: .00001;
		opacity: .00001;
	}
}

@-ms-keyframes shade {
	0%,
	25%,
	75%,
	100% {
		-ms-opacity: .99999;
		opacity: .99999;
	}
	50% {
		-ms-opacity: .00001;
		opacity: .00001;
	}
}

@-o-keyframes shade {
	0%,
	25%,
	75%,
	100% {
		-o-opacity: .99999;
		opacity: .99999;
	}
	50% {
		-o-opacity: .00001;
		opacity: .00001;
	}
}

@keyframes shade {
	0%,
	25%,
	75%,
	100% {
		-webkit-opacity: .99999;
		-moz-opacity: .99999;
		-ms-opacity: .99999;
		-o-opacity: .99999;
		opacity: .99999;
	}
	50% {
		-webkit-opacity: .00001;
		-moz-opacity: .00001;
		-ms-opacity: .00001;
		-o-opacity: .00001;
		opacity: .00001;
	}
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotateX(-22deg) rotateY(360deg);
        transform: rotateX(-22deg) rotateY(360deg);
    }

    100% {
        -webkit-transform: rotateX(-22deg) rotateY(0);
        transform: rotateX(-22deg) rotateY(0);
    }
}

@-moz-keyframes spin {
    0% {
        -moz-transform: rotateX(-22deg) rotateY(360deg);
        transform: rotateX(-22deg) rotateY(360deg);
    }

    100% {
        -moz-transform: rotateX(-22deg) rotateY(0);
        transform: rotateX(-22deg) rotateY(0);
    }
}

@-ms-keyframes spin {
    0% {
        -ms-transform: rotateX(-22deg) rotateY(360deg);
        transform: rotateX(-22deg) rotateY(360deg);
    }

    100% {
        -ms-transform: rotateX(-22deg) rotateY(0);
        transform: rotateX(-22deg) rotateY(0);
    }
}

@-o-keyframes spin {
    0% {
        -o-transform: rotateX(-22deg) rotateY(360deg);
        transform: rotateX(-22deg) rotateY(360deg);
    }

    100% {
        -o-transform: rotateX(-22deg) rotateY(0);
        transform: rotateX(-22deg) rotateY(0);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotateX(-22deg) rotateY(360deg);
        -moz-transform: rotateX(-22deg) rotateY(360deg);
        -ms-transform: rotateX(-22deg) rotateY(360deg);
        -o-transform: rotateX(-22deg) rotateY(360deg);
        transform: rotateX(-22deg) rotateY(360deg);
    }

    100% {
        -webkit-transform: rotateX(-22deg) rotateY(0);
        -moz-transform: rotateX(-22deg) rotateY(0);
        -ms-transform: rotateX(-22deg) rotateY(0);
        -o-transform: rotateX(-22deg) rotateY(0);
        transform: rotateX(-22deg) rotateY(0);
    }
}
              
            
!

JS

              
                /* Please ❤ this and follow me if you like it! */
              
            
!
999px

Console