文章详情页
css3 - css @keyframe 能带小数吗
浏览:177日期: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. javascript - .vue页面跳转问题2. java - 微信小程序中 无缘无故的提示(图片的加载失败)3. [python2]local variable referenced before assignment问题4. python - TypeError: tryMsgcode() takes exactly 2 arguments (0 given)5. javascript - 像这种内联Js绑定方式,如何定位到js代码?6. python - 一个程序中的切片问题7. javascript - 使用form进行页面跳转,但是很慢,如何加一个Loading?8. javascript - vue-cli中 用proxyTable实现了跨域,用get访问没有问题,但通过 post传数据就出现了问题9. css - 手机app中rem的基准值计算错误10. module - python模块from import语句相对导入,加不加点号有什么区别?
排行榜

网公网安备