css3 不应该在 height: 100% 和 height: 200px 之间进行动画转换吗?
css3 过渡将插入 div 高度的状态。
目前,如果您使用与之前高度不同的单位设置高度,chrome13 将不会进行插值,
即:
- set height to 100%
- set height to 50% (on a different rendering frame)
- height will animate correctly (assuming proper use of transition)
- set height to 100px
- height will not animate
Chrome bug?规格错误?
激励性的示例性 jsfiddle:http://jsfiddle.net/zDywJ/21/
css3 transitions will interpolate the state of the height of a div.
Currently, chrome13 will not interpolate if you set the height with a different unit than the previous height
i.e.:
- set height to 100%
- set height to 50% (on a different rendering frame)
- height will animate correctly (assuming proper use of transition)
- set height to 100px
- height will not animate
Chrome bug? spec bug?
Illustrative jsfiddle for the motivated: http://jsfiddle.net/zDywJ/21/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为这是 Chrome 或规范中的错误。
据我所知,CSS 无法将百分比更改为像素单位...因此它无法比较开始和结束以执行转换。
I don't think this is a bug in Chrome or in the spec.
As far as I can see, CSS has no way to change a percentage into a pixel unit... so it would not have a way to compare the beginning and end in order to execute the transition.