Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Random opacity
let randomOpacity = (Math.random() * (0.50 - 1) + 1).toFixed(2);
// in react:
<p key={k} style={{opacity: randomOpacity}}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment