文章详情页
css3 - css @keyframe 能带小数吗
浏览:158日期:2023-07-29 18:11:15
问题描述
比如 10.3% 如果可以精确度是多少?
问题解答
回答1:可以,但是最多只能保持2为小数点。
@keyframes myAnimation { 0% { height: 100px; } 33.3% { height: 120px; } 66.6% { height: 140px; } 100% { height: 200px; }}
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
SO上的相关链接:
Is it allowed to use any decimal value in CSS keyframe animations?
Can you use more than a whole number with @keyframe percents?
标签:
CSS
相关文章:
1. angular.js - ng-grid 和tabset一起用时,grid width默认特别小2. vim - docker中新的ubuntu12.04镜像,运行vi提示,找不到命名.3. python的文件读写问题?4. python for循环中的函数只能运行一次?5. javascript - Vue.js2.0不能使用debounce后大伙一般是如何解决延迟请求的问题的呢。6. nginx - ssl加密访问证书不受信任7. python - pyspider爬取了接近1G的数据,无法导出csv?8. css - transform-origin 旋转参考点9. java - socket类服务端如何防止被ddos攻击?10. 请问是对象还是数组
排行榜
