translate3d与翻译性能 [英] translate3d vs translate performance

查看:62
本文介绍了translate3d与翻译性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们现在都知道,尤其是从那篇不错的文章,我们应该更喜欢使用css变换来动画位置。

We now all know, particularly from that nice article, that we should prefer css-transforms to animate position.

但是我们可以在之间进行选择translate() translate3d() ...

But we got the choice between translate() and translate3d()...

其中一个是通常更快?

推荐答案

下面的此站点运行测试,比较 translate() translate3d()和其他几个属性。根据它的说法, translate3d()在大多数浏览器中都更快。

This site below runs tests comparing translate(), translate3d(), and a couple other properties. According to it, translate3d() is faster in most browsers.

http://jsperf.com/translate3d-vs-xy

这篇关于translate3d与翻译性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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