Skip to content

Instantly share code, notes, and snippets.

@viko16
Last active February 9, 2016 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viko16/dcff8e44a831d99d416b to your computer and use it in GitHub Desktop.
Save viko16/dcff8e44a831d99d416b to your computer and use it in GitHub Desktop.
解决 Chrome 下 CSS keyframe animation 导致 CPU 过高的问题 #css
.el {
transform: transition3d(0,0,0);
transform: translateZ(0); /* 推荐 */
}
/*
* 二选一即可
* 强制开启GPU硬件加速
* 参考:
* @url http://stackoverflow.com/questions/13176746/css-keyframe-animation-cpu-usage-is-high-should-it-be-this-way
* @url http://blog.bingo929.com/transform-translate3d-translatez-transition-gpu-hardware-acceleration.html
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment