Skip to main content

Alvaro Montoro

Web development enthusiast, CSS trickster, 2006 Time Magazine Person of the Year.

Article

Are There Random Numbers in CSS?

CSS allows you to create dynamic layouts and interfaces on the web, but as a language, it is static: once a value is set, it cannot be changed. The idea of randomness is off the table. Generating random numbers at runtime is the territory of JavaScript, not so much CSS. Or is it? If we factor in a little user interaction, we actually can generate some degree of randomness in CSS. Let’s take a look!… Read article

icon-link icon-logo-star icon-search icon-star