Is it allowed to use any decimal value in CSS keyframe animations?

后端 未结 2 1095
生来不讨喜
生来不讨喜 2020-12-10 02:32

I\'m wondering if it\'s ok to use percentage values like this:

@keyframes myAnimation {
    0%    { height: 100px; }
    33.3% { height: 120px; }
    66.6% {         


        
2条回答
  •  情书的邮戳
    2020-12-10 03:06

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

    I hope this helps.

提交回复
热议问题