[animation performance] Modern browsers can animate four things really cheaply: position, scale, rotation and opacity. #notes #css #animation
/*
PERFORMANCE
there are certain combinations that can be animated safely:
transform: translate()
transform: scale()
transform: rotate()
opacity
*/
.example {
transform: translate(0px, 0px);
transform: scale(1);
transform: rotate(0deg);
opacity: (1);
}
Here are the most popular CSS properties that, when changed, trigger layout:
The larger the tree of visible elements, the longer it takes to perform layout calculations, so you must take pains to avoid animating properties that trigger layout.
There are many properties that will trigger a paint, but here are the most popular:
If you animate any of the above properties the element(s) affected are repainted, and the layers they belong to are uploaded to the GPU.
sources: