Safari 关键帧位置更改不起作用

发布于 2025-01-11 15:49:36 字数 399 浏览 1 评论 0原文

我遇到了 safari 不会更改 @keyframes 中的位置属性的问题。

这是示例: https://codesandbox.io/ s/blissful-keller-tb66vb?file=/src/styles.css

我在这里想做的是在固定位置的元素上最后播放动画框架使其绝对定位,以便它出现在页面中间的绿线上。在 chrome、firefox 等中,它按我的预期工作,但在 safari 中,它在动画完成后保持固定。如何在动画播放后强制元素绝对定位?

Safari 版本13.0.3

I've faced the problem that safari doesn't change the position property in @keyframes.

Here is the example: https://codesandbox.io/s/blissful-keller-tb66vb?file=/src/styles.css

What I want to do here is to play animation on element with fixed position and at the very last frame make it absolutely positioned so that it appears on the green line in the middle of the page. In chrome, firefox, etc. it works as I expected, but in safari it stays fixed after animation finished. How can I force the element to be absolutely positioned after animation played?

Safari ver.13.0.3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文