random()
The random() CSS function chooses a random numeric value within a specified range. This allows for dynamic, randomized styling using CSS.
Status
Limited availability
MDN documentation
Specifications
Browser support
- Chrome ❌
- Chrome Android ❌
- Edge ❌
- Firefox ❌
- Firefox for Android ❌
- Safari 26.2 Released on 2025-12-12
- Safari on iOS 26.2 Released on 2025-12-12
Web Platform Tests (WPT)
View the latest WPT test results for this featureDeveloper votes
Do you need this feature?
Let us know by leaving a 👍 reaction on the feedback issue. Don't forget to also leave a comment explaining your specific use case.
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist