CSS3属性像动画太CPU CPU吗? [英] Are CSS3 properties like animate too CPU intensive?

查看:633
本文介绍了CSS3属性像动画太CPU CPU吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个重复的动画代码会让我的系统变慢吗?

  @  -  webkit-keyframes animate {-webkit-animation-所有CSS3属性都是CPU密集型的?



谢谢。

解决方案

避免使用box-shadow&文本阴影。不要尝试和动画整个页面或body元素,并使用translate3d,scale3d,rotate3d,因为它们是硬件加速在计算机和移动设备上。如上所述,避免动画属性的OVERUSE。但我怀疑一个或甚至四个无限动画元素会减慢你的页面。



提高您的HTML5应用



更新



浏览器现在丢弃用于transform-3D属性的硬件加速。您将不得不使用其他方法来优化应用程序的现在和未来。


will this repetitive animation code slow down my system?:

@-webkit-keyframes animate {-webkit-animation-iteration-count:infinite;...}

Are all CSS3 properties CPU intensive ?

Thanks.

解决方案

Avoid using box-shadow & text-shadow. Don't try and animate the whole page, or the body element and use translate3d, scale3d, rotate3d as they are hardware accelerated on computers and mobile devices. As stated above, avoid the OVERUSE of animating properties. I however doubt that one or even four infinitely animated elements will slow down your page.

Improving the Performance of your HTML5 App

UPDATE

Beware! Browsers are now dropping hardware acceleration for transform-3D properties. You will have to use other methods to optimize your apps as of now and in the future.

这篇关于CSS3属性像动画太CPU CPU吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆