Created
May 8, 2018 21:38
-
-
Save BenFausch/7ce99cc80fa9d37e4d36564bb8d01e3c to your computer and use it in GitHub Desktop.
Random opacity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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