January 11, 2017 03:10 pm GMT
Original Link: https://css-tricks.com/random-numbers-css/
Random Numbers in CSS
I stumbled into an interesting problem the other day. I wanted to animate an element with a random animation-duration
. This was the non-randomized starting point:
See the Pen Random numbers CSS #1 by Robin Rendle (@robinrendle) on CodePen.
This is the CSS I wrote to make the animation:
@keyframes flicker {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
#red {
animation: flicker 2s ease alternate infinite;
}
So far so good. But …
Random Numbers in CSS is a post from CSS-Tricks
Original Link: https://css-tricks.com/random-numbers-css/
Share this article:
Tweet
View Full Article