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="holder">
	<div id="tenmillions" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
	<div id="millions" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
	<div id="hundredthousands" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
	<div id="tenthousands" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
	<div id="thousands" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
	<div id="hundreds" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
	<div id="tens" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
	<div id="ones" class="reel">
		<div>9</div>
		<div>8</div>
		<div>7</div>
		<div>6</div>
		<div>5</div>
		<div>4</div>
		<div>3</div>
		<div>2</div>
		<div>1</div>
		<div>0</div>
	</div>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap");

body {
	height: 100vh;
	margin: 0;
	display: grid;
	place-items: center;
	font-family: "JetBrains Mono", monospace;
	text-shadow: 0 0 5px white;
	perspective: 1000px;
	perspective-origin: calc(50% - 0) calc(50% - 0);
	background: rgb(25, 25, 25);
	color: rgb(255, 255, 255);
}

.holder {
	width: 350px;
	height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: row;
	justify-content: space-between;
	transform-style: preserve-3d;
	animation: hold 30s infinite ease-in-out;
}
.holder:after {
	content: "";
	width: 600px;
	height: 300px;
	left: -150px;
	top: -50px;
	position: absolute;
	background: rgb(25 25 25 / 0.9);
	filter: blur(20px);
}
.holder:before {
	// shadow
	content: "";
	width: 340px;
	height: 100px;
	left: 0;
	top: 50px;
	position: absolute;
	background: rgb(0, 0, 0 / 1);
	transform: translateY(230px) rotateX(90deg);
	filter: blur(20px);
}

@keyframes hold {
	0%,
	100% {
		transform: rotateY(-30deg) rotateX(-2deg);
	}
	50% {
		transform: rotateY(38deg) rotateX(8deg);
	}
}

.reel {
	position: relative;
	//width: 500px;
	//height: 100px;
	//background: yellow;
	transform-style: preserve-3d;
}

.reel div {
	position: absolute;
	text-align: center;
	width: 50px;
	height: 100px;
	font-size: 72px;
	line-height: 100px;
	//background: #0003;
	animation: fade 10s infinite linear;
	//-webkit-backface-visibility: hidden; /* Safari */
	//backface-visibility: hidden;
}

@for $i from 0 through 9 {
	.reel div:nth-child(#{$i + 1}) {
		--left: #{$i * 50px};
		transform: translate(-50%, -50%) rotateX($i * 36deg) translateZ(154px);
		animation-delay: #{$i + s};
	}
}

* {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

#ones {
	animation: increment-ones 10s infinite ease-in;
}
#tens {
	animation: increment-tens 100s infinite ease-in;
}
#hundreds {
	animation: increment-hund 1000s infinite ease-in;
}
#thousands {
	animation: increment-thou 10000s infinite ease-in;
}
#tenthousands {
	animation: increment-tenthou 100000s infinite ease-in;
}
#hundredthousands {
	animation: increment-hunthou 1000000s infinite ease-in;
}
#millions {
	animation: increment-million 10000000s infinite ease-in;
}
#tenmillions {
	animation: increment-tenmillion 10000000s infinite ease-in;
}

@keyframes increment-ones {
	0% {
		transform: rotateX(0);
	}
	@for $i from 1 through 10 {
		#{$i}0% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}
@keyframes increment-tens {
	0%,
	9% {
		transform: rotateX(0);
	}
	100% {
		transform: rotateX(-360deg);
	}
	@for $i from 1 through 9 {
		#{$i}0%,
		#{$i}9% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}
@keyframes increment-hund {
	0%,
	9.9% {
		transform: rotateX(0);
	}
	100% {
		transform: rotateX(-360deg);
	}
	@for $i from 1 through 9 {
		#{$i}0%,
		#{$i}9.9% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}
@keyframes increment-thou {
	0%,
	9.99% {
		transform: rotateX(0);
	}
	100% {
		transform: rotateX(-360deg);
	}
	@for $i from 1 through 9 {
		#{$i}0%,
		#{$i}9.99% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}
@keyframes increment-tenthou {
	0%,
	9.999% {
		transform: rotateX(0);
	}
	100% {
		transform: rotateX(-360deg);
	}
	@for $i from 1 through 9 {
		#{$i}0%,
		#{$i}9.999% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}
@keyframes increment-hunthou {
	0%,
	9.9999% {
		transform: rotateX(0);
	}
	100% {
		transform: rotateX(-360deg);
	}
	@for $i from 1 through 9 {
		#{$i}0%,
		#{$i}9.9999% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}
@keyframes increment-million {
	0%,
	9.99999% {
		transform: rotateX(0);
	}
	100% {
		transform: rotateX(-360deg);
	}
	@for $i from 1 through 9 {
		#{$i}0%,
		#{$i}9.99999% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}
@keyframes increment-tenmillion {
	0%,
	9.999999% {
		transform: rotateX(0);
	}
	100% {
		transform: rotateX(-360deg);
	}
	@for $i from 1 through 9 {
		#{$i}0%,
		#{$i}9.999999% {
			transform: rotateX((-36 * $i) + deg);
		}
	}
}

              
            
!

JS

              
                // tried to make it count down to a specifiy date but introducing JS to pure CSS timer caused more problems that is was worth. Hence JS abandoned.

/*var date1 = new Date(); // current date
var date2 = new Date("02/27/2024"); // mm/dd/yyyy format
var timeDiff = Math.abs(date2.getTime() - date1.getTime()); // in miliseconds
var timeDiffInSecond = Math.ceil(timeDiff / 1000); // in second

//alert(timeDiffInSecond);
var str = timeDiffInSecond.toString();

console.log(str);

for (var i = 0; i < str.length; ++i) {
	var chr = str.charAt(i);
	console.log(chr);

	var tm = parseInt(chr);
	console.log("tm " + tm);
	$(".holder .reel:nth-child(" + (i + 1) + ")")
		.children("div")
		.each(function () {
			//$(this).html((tm + 10) % 10);
			$(this).css("transform", "translate(-50%, -50%) rotateX(" + ((tm + 10) % 10) + " * 36deg) translateZ(154px)");
			tm--;
		});
}

              
            
!
999px

Console