Is the css3 animation calculation keep going on in background if any element is hidden (display:none).
For example: I have the following css to rotate the globe on the page before loading the data and UI.
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(360deg);
}
to {
-webkit-transform: rotate(0deg);
}
}
@keyframes rotate {
from {
transform: rotate(360deg);
}
to {
transform: rotate(0deg);
}
}
.rotating-globe{
background-image:url(../images/globe.png);
-webkit-animation: rotate 20s linear infinite 0s;
animation: rotate 20s linear infinite 0s;
}
I observe when globe is set display:none
then the globe angle keep changing if I again show it.
If it is keep rotating the globe even it is hidden then it is eating CPU cycles which is not desired.
I want to know, Does the css animation calculation still goes on or not?
Thank you.