The Odometer Effect (without JavaScript)
We can take a value set in an HTML attribute and use it in CSS, even extracting each individual digit in order to animate separately.
We can take a value set in an HTML attribute and use it in CSS, even extracting each individual digit in order to animate separately.
Did you know you can declare number values in JavaScript with notation like 1_000_000? This is especially useful for large numbers where you might be used to seeing commas within the number to help readability (but commas themselves are invalid). It’s perhaps even more useful when declaring numbers in binary, hexadecimal, or BigInt notation.
Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.