-1

I have a large animation with smaller parts so that it can repeat infinitely.

@-webkit-keyframes doubletap {
  0% {opacity: 0;}
  11% {opacity: 0;}
  12.6% {opacity: 1;}
  15.625% {opacity: 0;}
  18.65% {opacity: 1;}
  18.75% {opacity: 0;}
  94% {opacity: 0;}
  95%{opacity: 1}
  97.5%{opacity: 0;}
  99%{opacity: 1;}
  100% {opacity: 0;}
}

would it be read as those percents exactly or does it round to the nearest full number or ignore the decimal altogether? It says nothing about this on MDN or anywhere else I can find.

  • possible duplicate of [Is it allowed to use any decimal value in CSS keyframe animations?](http://stackoverflow.com/questions/10486242/is-it-allowed-to-use-any-decimal-value-in-css-keyframe-animations) – Tymek Jan 15 '15 at 10:05
  • Sorry, I searched for that almost verbatim but didn't find anything. Thanks for pointing me in the right direction! – Patrick Krawczykowski Jan 15 '15 at 10:16

1 Answers1

1

CSS takes notice of percentages down to 2 decimal places and then stops. So you would be able to get 18.65% but not 15.625% for use in your keyframes

Akshay
  • 14,138
  • 5
  • 46
  • 70