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

              
                <!-- inspired by https://dribbble.com/shots/15637555-redblock -->
<a class="reference" href="https://dribbble.com/shots/15637555-redblock" target="_blank">Insipred by https://dribbble.com/shots/15637555-redblock</a>
<div class="scene">
	<!-- 	A | [1, 2] -->
	<div class="cube">
		<div class="side front">A</div>
		<div class="side back">A</div>
		<div class="side left">A</div>
		<div class="side right">A</div>
		<div class="side top">A</div>
		<div class="side bottom">A</div>
	</div>
	<div class="cube">
		<div class="side front">A</div>
		<div class="side back">A</div>
		<div class="side left">A</div>
		<div class="side right">A</div>
		<div class="side top">A</div>
		<div class="side bottom">A</div>
	</div>
	<!-- 	end of A | [1, 2] -->

	<!-- 	B | [3, 4, 5] -->
	<div class="cube">
		<div class="side front">B</div>
		<div class="side back">B</div>
		<div class="side left">B</div>
		<div class="side right">B</div>
		<div class="side top">B</div>
		<div class="side bottom">B</div>
	</div>
	<div class="cube">
		<div class="side front">B</div>
		<div class="side back">B</div>
		<div class="side left">B</div>
		<div class="side right">B</div>
		<div class="side top">B</div>
		<div class="side bottom">B</div>
	</div>
	<div class="cube">
		<div class="side front">B</div>
		<div class="side back">B</div>
		<div class="side left">B</div>
		<div class="side right">B</div>
		<div class="side top">B</div>
		<div class="side bottom">B</div>
	</div>
	<!-- 	end of B | [3, 4, 5] -->

	<!-- 	C | [6, 7, 8, 9] -->
	<div class="cube">
		<div class="side front">C</div>
		<div class="side back">C</div>
		<div class="side left">C</div>
		<div class="side right">C</div>
		<div class="side top">C</div>
		<div class="side bottom">C</div>
	</div>
	<div class="cube">
		<div class="side front">C</div>
		<div class="side back">C</div>
		<div class="side left">C</div>
		<div class="side right">C</div>
		<div class="side top">C</div>
		<div class="side bottom">C</div>
	</div>
	<div class="cube">
		<div class="side front">C</div>
		<div class="side back">C</div>
		<div class="side left">C</div>
		<div class="side right">C</div>
		<div class="side top">C</div>
		<div class="side bottom">C</div>
	</div>
	<div class="cube">
		<div class="side front">C</div>
		<div class="side back">C</div>
		<div class="side left">C</div>
		<div class="side right">C</div>
		<div class="side top">C</div>
		<div class="side bottom">C</div>
	</div>
	<!-- 	end of C | [6, 7, 8, 9] -->

	<!-- 	D | [10, 11, 12, 13] -->
	<div class="cube">
		<div class="side front">D</div>
		<div class="side back">D</div>
		<div class="side left">D</div>
		<div class="side right">D</div>
		<div class="side top">D</div>
		<div class="side bottom">D</div>
	</div>
	<div class="cube">
		<div class="side front">D</div>
		<div class="side back">D</div>
		<div class="side left">D</div>
		<div class="side right">D</div>
		<div class="side top">D</div>
		<div class="side bottom">D</div>
	</div>
	<div class="cube">
		<div class="side front">D</div>
		<div class="side back">D</div>
		<div class="side left">D</div>
		<div class="side right">D</div>
		<div class="side top">D</div>
		<div class="side bottom">D</div>
	</div>
	<div class="cube">
		<div class="side front">D</div>
		<div class="side back">D</div>
		<div class="side left">D</div>
		<div class="side right">D</div>
		<div class="side top">D</div>
		<div class="side bottom">D</div>
	</div>
	<!-- 	end of D | [10, 11, 12, 13] -->

	<!-- 	E | [14] -->
	<div class="cube">
		<div class="side front">E</div>
		<div class="side back">E</div>
		<div class="side left">E</div>
		<div class="side right">E</div>
		<div class="side top">E</div>
		<div class="side bottom">E</div>
	</div>
	<!-- 	end of E | [14] -->

	<!-- 	F | [15, 16] -->
	<div class="cube">
		<div class="side front">F</div>
		<div class="side back">F</div>
		<div class="side left">F</div>
		<div class="side right">F</div>
		<div class="side top">F</div>
		<div class="side bottom">F</div>
	</div>
	<div class="cube">
		<div class="side front">F</div>
		<div class="side back">F</div>
		<div class="side left">F</div>
		<div class="side right">F</div>
		<div class="side top">F</div>
		<div class="side bottom">F</div>
	</div>
	<!-- 	end of F | [15, 16] -->

	<!-- 	G | [17, 18, 19, 20] -->
	<div class="cube">
		<div class="side front">G</div>
		<div class="side back">G</div>
		<div class="side left">G</div>
		<div class="side right">G</div>
		<div class="side top">G</div>
		<div class="side bottom">G</div>
	</div>
	<div class="cube">
		<div class="side front">G</div>
		<div class="side back">G</div>
		<div class="side left">G</div>
		<div class="side right">G</div>
		<div class="side top">G</div>
		<div class="side bottom">G</div>
	</div>
	<div class="cube">
		<div class="side front">G</div>
		<div class="side back">G</div>
		<div class="side left">G</div>
		<div class="side right">G</div>
		<div class="side top">G</div>
		<div class="side bottom">G</div>
	</div>
	<div class="cube">
		<div class="side front">G</div>
		<div class="side back">G</div>
		<div class="side left">G</div>
		<div class="side right">G</div>
		<div class="side top">G</div>
		<div class="side bottom">G</div>
	</div>
	<!-- 	end of G | [17, 18, 19, 20] -->

	<!-- 	Animated cube | [21] -->
	<!-- 	<div class="cube">
		<div class="side front">G</div>
		<div class="side back">G</div>
		<div class="side left">G</div>
		<div class="side right">G</div>
		<div class="side top">G</div>
		<div class="side bottom">G</div>
	</div> -->
	<!-- 	end of Animated cube | [21] -->
	<div class="floor"></div>
	<div class="floor-shade"></div>
</div>
              
            
!

CSS

              
                $x: 1em;
$y: 1em;
$z: 1em;

body {
	font-size: 100px;
	background-color: #1d3458;
	min-height: 100vh;
	overflow-y: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	perspective: 16em;
	perspective-origin: center calc(50% - 7.5em);
}

.reference {
	position: fixed;
	top: 0;
	left: 0;
	color: white;
	font-size: 24px;
}

.scene {
	position: relative;

	transform-style: preserve-3d;
	transform: rotateY(-45deg);
}

.floor {
	position: absolute;
	width: 25em;
	height: 25em;
	background-image: radial-gradient(#ffff, #fffa 10%, #1d3458 66%);
	background-size: 35em;
	background-position: top right;
	transform: translate(-50%, -50%) rotateX(90deg) rotateZ(-75deg)
		translateZ(-1em);
}

.floor-shade {
	transform-style: preserve-3d;
	position: absolute;
	bottom: 0;
	left: $x;

	transform: translateX(-1.5 * $x) translateY(3.5 * $y)
		translateZ(-1.5 * $z + $z / 2) rotateX(90deg);

	width: 4em;
	height: 5em;
	background-color: #0006;
	filter: blur(0.1em);
}

.cube {
	transform-style: preserve-3d;
	transition: transform 2s ease-in-out;

	// Group letters
	// Set color to white to see groups
	text-align: center;
	// color: #fff1;
	color: transparent;

	width: $x;
	height: $y;

	position: absolute;
	top: -$y * 2;
	left: $x;

	.side {
		position: absolute;
		// box-shadow: 0 0 0.25em #000a inset;

		// Fixes weird lines bugg in .floor-shade
		box-shadow: 0 0 1px #0000;
	}

	.front {
		width: $x;
		height: $y;

		transform: translateZ($z / 2);
	}
	.back {
		width: $x;
		height: $y;

		transform: rotateY(180deg) translateZ($z / 2);
	}

	.right {
		width: $z;
		height: $y;

		transform: rotateY(90deg) translateZ($x - ($z / 2));
	}
	.left {
		width: $z;
		height: $y;

		transform: rotateY(270deg) translateZ($z / 2);
	}

	.top {
		position: absolute;
		width: $x;
		height: $z;

		transform: translateY(-50%) rotateX(90deg);
	}
	.bottom {
		position: absolute;
		width: $x;
		height: $z;

		bottom: 0;

		transform: translateY(50%) rotateX(90deg);
	}
}

// Box shadow used for sides is inset top right bottom left
// box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
// 				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
// 				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
// 				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);

.scene {
	.cube:nth-child(n + 1):nth-child(-n + 5) .side.bottom {
		// Re-introduces weird lines bugg in .floor-shade (post-fix)...
		// box-shadow: 3px 2px 1px #000f;
	}
	// A | [1, 2]
	.cube:nth-child(n + 1):nth-child(-n + 2) .side {
		background: #648baa;
	}
	.cube:nth-child(1) {
		transform: translateX(-2 * $x) translateY(2 * $y) translateZ(2 * $z);

		& .side.top {
			background: #4375a0;
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);
		}
	}
	.cube:nth-child(2) {
		transform: translateX(-1 * $x) translateY(2 * $y) translateZ(2 * $z);

		& .side.right {
			background: #3b546b;
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15);
		}
	}
	// end of A | [1, 2]

	// B | [3, 4, 5]
	.cube:nth-child(n + 3):nth-child(-n + 5) .side {
		background: #545771;
	}
	.cube:nth-child(3) {
		transform: translateX(1 * $x) translateY(2 * $y) translateZ(2 * $z);

		& .side.top {
			background: #292b4c;

			background-image: linear-gradient(
				-65deg,
				#292b4c 0%,
				#292b4c 65%,
				#1a1a32 68%
			);
		}
		& .side.right {
			background: #242645;
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);
		}
	}
	.cube:nth-child(4) {
		transform: translateX(1 * $x) translateY(2 * $y) translateZ(1 * $z);

		& .side.right {
			background: #242645;
		}
	}
	.cube:nth-child(5) {
		transform: translateX(1 * $x) translateY(2 * $y) translateZ(0 * $z);

		& .side.right {
			background: #242645;
		}
	}
	// end of B | [3, 4, 5]

	// C | [6, 7, 8, 9]
	.cube:nth-child(n + 6):nth-child(-n + 9) .side {
		background: #545771;
	}
	.cube:nth-child(6) {
		transform: translateX(-1 * $x) translateY(1 * $y) translateZ(2 * $z);

		& .side.front {
			box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);
		}
	}
	.cube:nth-child(7) {
		transform: translateX(0 * $x) translateY(1 * $y) translateZ(2 * $z);

		& .side.right {
			background: #1a1a32;
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15);
		}
	}
	.cube:nth-child(8) {
		transform: translateX(-1 * $x) translateY(0 * $y) translateZ(2 * $z);

		& .side.front {
			box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);
		}
	}
	.cube:nth-child(9) {
		transform: translateX(-1 * $x) translateY(-1 * $y) translateZ(2 * $z);

		& .side.right {
			background: #1e213b;
		}
		& .side.top {
			background: #2d2f58;
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);
		}
	}
	// end of C | [6, 7, 8, 9]

	// D | [10, 11, 12, 13]
	.cube:nth-child(n + 10):nth-child(-n + 13) .side {
		background: #86a4a5;
	}
	.cube:nth-child(10) {
		transform: translateX(1 * $x) translateY(1 * $y) translateZ(1 * $z);

		& .side.right {
			background: #75999b;
		}
		& .side.front {
			background: #86a4a5;
			background-image: linear-gradient(
					180deg,
					#627678 0%,
					#627678 30%,
					transparent 33%
				),
				linear-gradient(-90deg, transparent 0%, transparent 50%, #627678 53%),
				radial-gradient(circle, transparent 0%, transparent 20%, #627678 70%);

			background-repeat: no-repeat;
			background-size: 100%, 100%, 200% 200%;
			background-position: 50%, 50%, top left;
		}
	}
	.cube:nth-child(11) {
		transform: translateX(1 * $x) translateY(1 * $y) translateZ(0 * $z);

		& .side.right {
			background: #75999b;
		}
		& .side.top {
			background: #566f72;
		}
	}
	.cube:nth-child(12) {
		transform: translateX(1 * $x) translateY(1 * $y) translateZ(-1 * $z);

		& .side.right {
			background: #75999b;
		}
		& .side.top {
			background-color: #566f72;
			background-image: linear-gradient(
				0deg,
				#566f72 0%,
				#566f72 60%,
				#75999b 100%
			);
		}
	}
	.cube:nth-child(13) {
		transform: translateX(1 * $x) translateY(0 * $y) translateZ(1 * $z);

		& .side.right {
			background: #75999b;
		}
		& .side.top {
			background-color: #a3d5d9;
			background-image: linear-gradient(
				-65deg,
				#a3d5d9 0%,
				#a3d5d9 65%,
				#708f92 68%
			);
		}
	}
	// end of D | [10, 11, 12, 13]

	// E | [14]
	.cube:nth-child(n + 14):nth-child(-n + 14) .side {
		background: #b0d8dd;
	}
	.cube:nth-child(14) {
		transform: translateX(-2 * $x) translateY(0 * $y) translateZ(2 * $z);

		& .side.top {
			background: #a3d4da;
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);
		}
	}
	// end of E | [14]

	// F | [15, 16]
	.cube:nth-child(n + 15):nth-child(-n + 16) .side {
		background: #dd646f;
	}
	.cube:nth-child(15) {
		transform: translateX(0 * $x) translateY(0 * $y) translateZ(2 * $z);

		& .side.top {
			background-color: #df4452;
			background-image: linear-gradient(
				-65deg,
				#df4452 0%,
				#df4452 65%,
				#96303a 68%
			);
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 1px 0 1px 0 rgba(255, 255, 255, 0.15);
		}
	}
	.cube:nth-child(16) {
		transform: translateX(1 * $x) translateY(0 * $y) translateZ(2 * $z);

		& .side.right {
			background: #a9333e;
		}
		& .side.top {
			background: #df4452;
		}
		& .side.front {
			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15);
		}
	}
	// end of F | [15, 16]

	// G | [17, 18, 19, 20]
	.cube:nth-child(n + 17):nth-child(-n + 20) .side {
		background: #597d9c;
	}
	.cube:nth-child(17) {
		transform: translateX(0 * $x) translateY(-1 * $y) translateZ(1 * $z);

		& .side.right {
			background: #2b4d66;
		}
		& .side.top {
			background-color: #417698;

			background-image: linear-gradient(
					0deg,
					transparent 0%,
					transparent 20%,
					#417698 65%
				),
				linear-gradient(-90deg, #417698 0%, #417698 50%, #35637f 53%);
		}
		& .side.front {
			background-color: #597d9c;
			background-image: linear-gradient(
				-90deg,
				#597d9c 0%,
				#597d9c 50%,
				#334a5b 53%
			);

			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15);
		}
	}
	.cube:nth-child(18) {
		transform: translateX(0 * $x) translateY(-1 * $y) translateZ(0 * $z);

		& .side.top {
			background: #417698;
		}
	}
	.cube:nth-child(19) {
		transform: translateX(-1 * $x) translateY(-1 * $y) translateZ(0 * $z);

		& .side.front {
			background: #527795;

			background-image: linear-gradient(
				-90deg,
				#32485a 0%,
				#32485a 47%,
				#527795 50%
			);
		}
		& .side.top {
			background: #417698;
		}
	}
	.cube:nth-child(20) {
		transform: translateX(1 * $x) translateY(-1 * $y) translateZ(0 * $z);

		& .side.right {
			background: #284860;
		}
		& .side.top {
			background: #417698;
		}
		& .side.front {
			background: #5a7e9b;

			background-image: linear-gradient(
				-90deg,
				#5a7e9b 0%,
				#5a7e9b 50%,
				#32485a 53%
			);

			box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15),
				inset -1px 0 1px 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15),
				inset 0 0 0 0 rgba(255, 255, 255, 0.15);
		}
	}
	// end of G | [17, 18, 19, 20]

	// Animated cube | [21] UNFINISHED
	.cube:nth-child(21) {
		transform: translateX(0 * $x) translateY(2 * $y) translateZ(1 * $z);
		animation: move 22s linear infinite;

		.side {
			background: #000;

			&.front {
				background-image: linear-gradient(45deg, #333, #000);
				animation: moveShadow 22s linear infinite;
			}
		}
	}

	@keyframes move {
		// 21 steps (+1 start/end)
		3.17%,
		4.76% {
			transform: translateX(0 * $x) translateY(2 * $y) translateZ(2 * $z);
		}
		7.94%,
		9.52% {
			transform: translateX(0 * $x) translateY(2 * $y) translateZ(3 * $z);
		}
		12.7%,
		14.29% {
			transform: translateX(-1 * $x) translateY(2 * $y) translateZ(3 * $z);
		}
		17.46%,
		19.05% {
			transform: translateX(-2 * $x) translateY(2 * $y) translateZ(3 * $z);
		}
		22.22%,
		23.81% {
			transform: translateX(-2 * $x) translateY(1 * $y) translateZ(3 * $z);
		}
		26.98%,
		28.57% {
			transform: translateX(-2 * $x) translateY(1 * $y) translateZ(2 * $z);
		}
		31.75%,
		33.33% {
			transform: translateX(-2 * $x) translateY(1 * $y) translateZ(1 * $z);
		}
		36.51%,
		38.1% {
			transform: translateX(-1 * $x) translateY(1 * $y) translateZ(1 * $z);
		}
		41.27%,
		42.86% {
			transform: translateX(-1 * $x) translateY(0 * $y) translateZ(1 * $z);
		}
		46.03%,
		47.62% {
			transform: translateX(-1 * $x) translateY(-1 * $y) translateZ(1 * $z);
		}
		50.79%,
		52.38% {
			transform: translateX(-1 * $x) translateY(-2 * $y) translateZ(1 * $z);
		}
		55.56%,
		57.14% {
			transform: translateX(0 * $x) translateY(-2 * $y) translateZ(1 * $z);
		}
		60.32%,
		61.9% {
			transform: translateX(0 * $x) translateY(-2 * $y) translateZ(2 * $z);
		}
		65.08%,
		66.67% {
			transform: translateX(0 * $x) translateY(-1 * $y) translateZ(2 * $z);
		}
		69.84%,
		71.43% {
			transform: translateX(1 * $x) translateY(-1 * $y) translateZ(2 * $z);
		}
		74.6%,
		76.19% {
			transform: translateX(1 * $x) translateY(-1 * $y) translateZ(1 * $z);
		}
		79.37%,
		80.95% {
			transform: translateX(1 * $x) translateY(-1 * $y) translateZ(0 * $z);
		}
		84.13%,
		85.71% {
			transform: translateX(1 * $x) translateY(0 * $y) translateZ(0 * $z);
		}
		88.89%,
		90.48% {
			transform: translateX(0 * $x) translateY(0 * $y) translateZ(0 * $z);
		}
		93.65%,
		95.24% {
			transform: translateX(0 * $x) translateY(1 * $y) translateZ(0 * $z);
		}
		98.41%,
		100% {
			transform: translateX(0 * $x) translateY(2 * $y) translateZ(0 * $z);
		}
	}

	@keyframes moveShadow {
		// 21 steps (+1 start/end)
		3.17%,
		4.76% {
			background-position: calc(50% - 0%) calc(50% + 0%);
			background-size: 400%;
		}
		7.94%,
		9.52% {
			background-position: calc(50% - 50%) calc(50% + 50%);
			background-size: 500%;
		}
		12.7%,
		14.29% {
			background-position: calc(50% - 50%) calc(50% + 50%);
			background-size: 600%;
		}
		17.46%,
		19.05% {
			background-position: calc(50% - 50%) calc(50% + 50%);
			background-size: 700%;
		}
		22.22%,
		23.81% {
			background-position: calc(50% - 40%) calc(50% + 40%);
			background-size: 700%;
		}
		26.98%,
		28.57% {
			background-position: calc(50% - 40%) calc(50% + 40%);
			background-size: 500%;
		}
		31.75%,
		33.33% {
			background-position: calc(50% - 0%) calc(50% + 0%);
			background-size: 400%;
		}
		36.51%,
		38.1% {
			background: #111;
		}
		41.27%,
		42.86% {
			background: #111;
		}
		46.03%,
		47.62% {
			background: #111;
		}
		50.79%,
		52.38% {
			background: #111;
		}
		55.56%,
		57.14% {
			background: #111;
		}
		60.32%,
		61.9% {
			background: #111;
		}
		65.08%,
		66.67% {
			background: #111;
		}
		69.84%,
		71.43% {
			background: #111;
		}
		74.6%,
		76.19% {
			background: #111;
		}
		79.37%,
		80.95% {
			background: #111;
		}
		84.13%,
		85.71% {
			background: #111;
		}
		88.89%,
		90.48% {
			background: #111;
		}
		93.65%,
		95.24% {
			background: #111;
		}
		98.41%,
		100% {
			background: #111;
		}
	}
	// end of Animated cube | [21]
}

              
            
!

JS

              
                
              
            
!
999px

Console