Skip to content

Instantly share code, notes, and snippets.

@BenFausch
Created May 8, 2018 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenFausch/7ce99cc80fa9d37e4d36564bb8d01e3c to your computer and use it in GitHub Desktop.
Save BenFausch/7ce99cc80fa9d37e4d36564bb8d01e3c to your computer and use it in GitHub Desktop.
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