<article>
      <p>This is how much Jeff Bezos made...</p>
      <output>
        <span class="symbol">$</span>
        <span class="number u8"></span>
        <span class="number u7"></span>
        <span class="number u6"></span>
        <span class="symbol u6">,</span>
        <span class="number u5"></span>
        <span class="number u4"></span>
        <span class="number u3"></span>
        <span class="symbol">,</span>
        <span class="number u2"></span>
        <span class="number u1"></span>
        <span class="number u0"></span>
      </output>
      <p>...since you started reading this page.</p>
    </article>
    <footer>
      <a href="https://github.com/alvaromontoro/bezos-calculator" target="_blank">See how this number was calculated</a>
    </footer>
html, body {
  --size: 1.5rem;
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Palatino, Helvetica, arial, sans-serif;
  overflow: hidden;
}

article {
  font-size: 5vmin;
}

article p {
  text-shadow: 
    0 -1px 1px #fff, 1px -1px 1px #fff, 1px 0 1px #fff,
    1px 1px 1px #fff, 0 1px 1px #fff, -1px 1px 1px #fff, 
    -1px 0 1px #fff, -1px -1px 1px #fff;
}

output {
  display: flex;
  justify-content: center;
}

output span {
  font-family: monospace, monospace;
  color: white;
  background: black;
  position: relative;
  z-index: 2;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  animation: show 0.125s linear 1;
  animation-fill-mode: forwards;
  font-size: var(--size);
  height: calc(var(--size) * 1.5);
  line-height: calc(var(--size) * 1.5);
  border-radius: 0.25rem;
  width: 0;
  margin: 0;
}

@keyframes show {
  100% { 
    width: var(--size); 
    margin: calc(var(--size) * 0.0625);
  }
}

span.u0 { animation-delay: 0.0000000000s; }
span.u1 { animation-delay: 0.0022739251s; }
span.u2 { animation-delay: 0.0277392510s; }
span.u3 { animation-delay: 0.2773925104s; }
span.u4 { animation-delay: 2.7739251040s; }
span.u5 { animation-delay: 27.739251040s; }
span.u6 { animation-delay: 277.39251040s; }
span.u7 { animation-delay: 2773.9251040s; }
span.u8 { animation-delay: 27739.251040s; }

output span.symbol {
  display: inline-block;
}

@keyframes animate {
  100% {
    transform: translateY(-100%);
  }
}

span.number::before {
  content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9";
  animation: animate 10s steps(10, end) infinite;
  position: absolute;
  top: 0;
  left: 0;
}

span.u0::before { animation-duration: 0.0022739251s; }
span.u1::before { animation-duration: 0.0277392510s; }
span.u2::before { animation-duration: 0.2773925104s; }
span.u3::before { animation-duration: 2.7739251040s; }
span.u4::before { animation-duration: 27.739251040s; }
span.u5::before { animation-duration: 277.39251040s; }
span.u6::before { animation-duration: 2773.9251040s; }
span.u7::before { animation-duration: 27739.251040s; }
span.u8::before { animation-duration: 277392.51040s; }

@keyframes pop {
  100% { 
    transform: translate(0, -200%); 
  }
}

aside {
  top: 0;
  position: absolute;
  background: #fca;
  padding: 2vmin;
  font-size: 2.5vw;
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  max-width: 25vw;
  max-width: clamp(100px, 25vw, 300px);
  border-radius: 1vmin;
  z-index: -1;
  animation: pop 20s linear;
  animation-fill-mode: forwards;
  box-shadow: 0 0 2vmin rgba(0,0,0,0.25);
  border: 1px solid rgba(0,0,0,0.125);
  line-height: 1.25;
  transform: translate(0, 100vh); 
}

aside.color0 { background: #ffadad; }
aside.color1 { background: #ffd6a5; }
aside.color2 { background: #fdffb6; }
aside.color3 { background: #caffbf; }
aside.color4 { background: #beeeef; }
aside.color5 { background: #a0c4ff; }
aside.color6 { background: #bdb2ff; }
aside.color7 { background: #ffc6ff; }

aside.time0 { animation-timing-function: linear; }
aside.time1 { animation-timing-function: ease; }
aside.time2 { animation-timing-function: ease-in; }
aside.time3 { animation-timing-function: ease-out; }
aside.time4 { animation-timing-function: ease-in-out; }

aside.top0 { z-index: 1; }
aside.top1 { z-index: 3; }

footer {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  font-size: 0.875rem;
}

@media all and (min-width:500px) {
  body {
    --size: 2.5rem;
  }
}

@media all and (min-width:750px) {
  body {
    --size: 3.5rem;
  }
}

@media all and (min-width:1000px) {
  body {
    --size: 4.5rem;
  }
}

@media all and (min-width:1200px) {
  body {
    --size: 5.5rem;
  }
}


const output = document.querySelector("output");
const body = document.querySelector("body");
const numColors = 8;
const numTiming = 5;
const numTops = 3;
let amount = 0;

function createBubble(time, text) {
  const left = Math.floor(Math.random() * 65);
  const aside = document.createElement("aside");
  aside.style.left = `${left + 5}vw`;
  aside.className = `color${Math.floor(Math.random() * numColors)} time${Math.floor(Math.random() * numTiming)} top${Math.floor(Math.random() * numTops)}`;
  aside.innerHTML = `<b>${time} seconds</b>:<br>${text}`;
  body.append(aside);
}

const bubbles = [
  { time: 4, text: "more than a minimum wage worker... in a year" },
  { time: 9, text: "more than Amazon's lowest paid employee... in a year" },
  { time: 13, text: "more than the median yearly salary in the United States" },
  { time: 18, text: "more than the average yearly salary in the United States" },
  { time: 23, text: "more than his own yearly salary!" },
  { time: 28, text: "enough not to qualify for covid-19 stimulus checks" },
  { time: 32, text: "more than the average yearly salary of a Senior Software Developer" },
  { time: 38, text: "enough to buy a 'basic' Aston Martin Vantage" },
  { time: 48, text: "more than what a US Senator makes in a year" },
  { time: 55, text: "enough to buy a fully loaded Tesla Model S" },
  { time: 70, text: "enough to raise a child from birth to age 17" },
  { time: 80, text: "enough to buy a house for the median price in the USA" },
  { time: 89, text: "more than the yearly salary of 99% of the US population" },
  { time: 111, text: "more than what the US President makes in a year" },
  { time: 277, text: "enough to pay for the most expensive fishing lure ever" }
]

bubbles.forEach(function (el) {
  setTimeout(`createBubble(${el.time}, "${el.text}")`, el.time * 1000);
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.