有关HTML5和硬件加速的问题 [英] Question about HTML5 and Hardware Acceleration

查看:576
本文介绍了有关HTML5和硬件加速的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简短的问题.我正在为多个div设置动画,并希望它们进行硬件加速.如果我只是为元素的 top 属性设置动画,但在其内联样式中添加translate3d(0,0,0),此硬件会加速它吗?

如果可能的话,指向您答案的链接将非常有用.

谢谢,
Dom

I have a quick question. I am animating multiple divs and would like them to be hardware accelerated. If I just animate the top property of the element, but add translate3d(0,0,0) to its inline style, will this hardware accelerate it?

If possible, a link to your answer would be great.

Thanks,
Dom

推荐答案

这取决于浏览器.取决于环境.取决于浏览器的设置等.
它是您不知道也不会对它产生任何影响的HTML.
HTML应该是非本地的标记语言.设计文档的内容(HTML),它是用户的视图,外观(CSS)以及行为(JS)的视图.
其他所有内容都是特定于平台的,您不能依赖它.
It depends of browser. Depends of environment. Depends of setting of the browser etc.
It is HTML you cannot know nor cannot have any influence for that.
HTML should be non-native, markup language. You designing contents of documents (HTML), it''s view to user, appereance (CSS), and sometimes behavior (JS).
Everything else is platform specific and you cannot rely on it.


这篇关于有关HTML5和硬件加速的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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