javascript - CSS Animations are not smooth on Chrome (iOS)
问题描述
I have a problem with CSS animations on Chrome browser, on iOS device. Animations are snapping into place and are not smooth. On Safari, Firefox or desktop Chrome everything works great.
Here is a simple example which is laggy on iOS version of Chrome:
.test {
width: 50px;
height: 50px;
background: pink;
transition: 2s;
}
.test:hover {
width: 100px;
height: 100px;
background: yellow;
transform: translateX(30px);
}
<div class="test"></div>
Is there any way to make such animations more smooth?
解决方案
我的动画在 chrome 中不稳定(比如每秒 2 帧)。也许是因为过去修复错误的痛苦经历让我相信它从未如此简单 - 但我花了几分钟才决定在我的 iPhone 上重新启动 Chrome。
我打开了 10 多个标签。一旦我关闭它们并重新启动 Chrome,动画就很好了。
希望这可以帮助某人感觉不那么愚蠢。
推荐阅读
- anova - anova_lm() 中 typ 的使用
- php - require_images 的值是多少
- javascript - vuejs - how to add custom icons to Quill (undo/redo)
- javascript - 为什么我可以通过一些 NodeList 而不是所有的 forEach?
- php - Laravel 按值求和
- visual-studio-mac - 每次我尝试登录时,Visual Studio for Mac 都会崩溃
- compiler-errors - 后缀符号的方式和原因
- php - mysqli_real_escape_string() 在数据库中不起作用
- ios - IOS iMessage扩展截图检测
- css - 如何使用 XSL 在 XML 中的特定 td 中保留新行和空白