Skip to content

Instantly share code, notes, and snippets.

@BenFausch BenFausch/random.js
Created May 8, 2018

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
You can’t perform that action at this time.