Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,当我使用瞬态通过更改 translate(x, y) 的值来实现 2s 持续时间的动画时。如何在 0.5s 时刻获取 translate(x, y) 的当前值?
我不认为你可以。通过将转换时间函数设置为linear,您可以轻松估计它,或者通过使用其他时间函数的贝塞尔曲线来计算它。
linear
我建议,如果您需要找到它,那么您最好使用动画(您可以定义使用关键帧的位置)或使用 javascript 动画(在 DOM 元素、画布或 SVG 上)。