I am using css animation but it seems to be a bit sluggish on some pages, I believe due to the CPU usage.
.test {
left:50%;
position:relative;
overflow:hidden;
animation: waitandhide2 2.2s 0s, show2 2.2s 2.2s;
-webkit-animation: waitandhide2 2.2s 0s, show2 2.2s 2.2s;
-moz-animation: waitandhide2 2.2s 0s, show2 2.2s 2.2s;
animation-timing-function: ease-in-out;
-moz-animation-timing-function: ease-in-out;
-webkit-animation-timing-function: ease-in-out;
z-index:5;
}
@keyframes waitandhide2 {
from { left:50%; opacity:1; }
to { left:-105%; opacity:1; }
}
@keyframes show2 {
from { left:105%; opacity:1; }
to { left:50%; opacity:1; }
}
@-webkit-keyframes waitandhide2 {
from { left:50%; opacity:1; }
to { left:-105%; opacity:1; }
}
@-webkit-keyframes show2 {
from { left:105%; opacity:1; }
to { left:50%; opacity:1; }
}
@-moz-keyframes waitandhide2 {
from { left:50%; opacity:1; }
to { left:-105%; opacity:1; }
}
@-moz-keyframes show2 {
from { left:105%; opacity:1; }
to { left:50%; opacity:1; }
}
I have read somewhere that you can fix this by using -webkit-transform: translate3d(0, 0%, 0); I have no idea how to do this in this scenario.
Any help is appreciated.