文章详情页
css3 - css @keyframe 能带小数吗
浏览:210日期: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. Ant design vue中的联动选择取消操作2. javascript - 单个页面执行多个jsonp的ajax请求,如何判断一个ajax请求执行完毕执行再另一个?3. vue.js - weex 没有背景图片属性怎么办?4. CSS3的渐变属性的疑惑5. css - transform-origin 旋转参考点6. css3 - CSS优先级问题7. objective-c - iOS开发使用什么对html进行代码高亮8. javascript - 使用原生ajax时,URL编码的问题9. css - 列表li与li之间的间距怎么设置?10. javascript - Vue 自定义控件v-model双向绑定
排行榜

网公网安备