jquery - Bootstrap 进度条动画使用 50% CPU

标签 jquery html css progress-bar angular-ui-bootstrap

我的网站上有几个进度条 <div class="progress-bar progress-bar-striped active"></div> .
这些进度条占用了大约 50% 的 CPU。
当我删除类(class)时 active从所有进度条来看,CPU 急剧下降。
我想要不占用太多 CPU 的动画进度条。
这可能吗?

最佳答案

我看到一个 answer关于 CSS 动画的 CPU 使用率,他们建议使用:

transform: translateZ(0);

This will composite the elements into their own layers (by tricking the browser into thinking it will be doing 3D transforms) and the browser should, in most cases, take advantage of GPU acceleration, lessening the burden on the CPU. For me this cut it down by about 20% (almost half)

关于jquery - Bootstrap 进度条动画使用 50% CPU,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34792969/

相关文章:

php - 在 joomla 3 模板中使用 php 的 css 变量

javascript - 动态元素附加到另一个 2 个动态元素中

javascript - 减少垂直对齐输入范围之间的间距

jquery - 交响乐团 : How to redirect to a new page in an AJAX call?

javascript - 使用 jQuery 的高效 AutoSuggest?

java - 如何将 HTML 表单提交重定向到 iframe?

javascript - Node Handlebars 在渲染 View 之前添加额外的文本 Node

html - 流体父子 div 中的垂直文本居中

javascript - 如何在 Jquery 中显示选择选项之前更新它们?

javascript - 如何获取所选输入 radio 的索引