即使父元素从视图中隐藏,3D CSS 变换也会继续吗?
在 Webkit 中,3D CSS 转换设置为无限重复,即使它或父元素通过样式 (CSS) 从视图中隐藏,也会继续吗?
我问这个问题的原因是我发现我正在开发的页面上的 CPU 使用率出乎意料地高。
如果有人知道诊断此问题的好方法(例如可视化页面上的 CPU 周期,而不是每个选项卡的总体 CPU 使用情况),我将非常感激。
轶事证据(删除隐藏的 CSS 动画)表明动画确实在后台运行。有谁知道如何防止这种情况?
In Webkit, will a 3D CSS transform set to repeat indefinitely, continue even when it or a parent element is hidden from view by styling (CSS)?
The reason I ask is that I am seeing unexpectedly high CPU usage on a page I am developing.
If anyone knows a good way to diagnose this issue (for example visualizing where CPU cycles are going on a page, as opposed to a blanket CPU usage per tab), I would be very grateful.
Anecdotal evidence (removal of the hidden CSS animation) would suggest that the animations do run in the background. Does anyone know how to prevent this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 chrome 16.0.912.75 中,即使元素设置为visibility:hidden;,至少 CSS 动画看起来仍会继续。设置显示:无显示可解决该问题。
In chrome 16.0.912.75, at least CSS animations appear to continue even when the element is set to visibility:hidden;. Setting display:none appears to resolve the issue.
您可以使用开发者工具 chrome / safari 右键单击检查元素来调试这种情况
。
转到时间轴选项卡并单击记录,之后您可以看到浏览器内部正在做什么。
you can debug this kind of situation with the developer tools
chrome / safari right click inspect element.
Go to the timeline tab and click on record, after that you can see what the browser is doing internally.