8 transform: translateZ(
0);
9 -webkit-animation-direction: alternate;
10 -webkit-animation-duration:
2s;
11 -webkit-animation-timing-function: linear;
12 -webkit-animation-iteration-count:
1;
13 -webkit-animation-delay:
1s;
17 -webkit-animation-fill-mode: both;
21 -webkit-animation-fill-mode: none;
25 -webkit-animation-fill-mode: forwards;
29 -webkit-animation-fill-mode: backwards;
33 -webkit-animation-name: anim-left;
38 -webkit-animation-name: anim-transform;
42 @-webkit-keyframes anim-left {
51 @-webkit-keyframes anim-transform {
53 transform: translateX(
250px);
56 transform: translateX(
500px);
62 Each section below has two boxes, the top runs on the main thread, the bottom
67 These boxes should start in the middle and finish at the end (both fill)
69 <div class=
"anim-left fill-both">MT
</div>
70 <div class=
"anim-transform fill-both">CT
</div>
72 These boxes should start in the middle and finish at the start (backwards fill)
74 <div class=
"anim-left fill-backwards">MT
</div>
75 <div class=
"anim-transform fill-backwards">CT
</div>
77 These boxes appear on the left and jump to the middle and finish at the end (forwards fill)
79 <div class=
"anim-left fill-forwards">MT
</div>
80 <div class=
"anim-transform fill-forwards">CT
</div>
82 These boxes appear on the left and jump to the middle and finish at the start (none fill)
84 <div class=
"anim-left fill-none">MT
</div>
85 <div class=
"anim-transform fill-none">CT
</div>
87 These boxes appear on the left and jump to the middle and finish at the start (auto fill)
89 <div id=
"leftAuto">MT
</div>
90 <div id=
"transformAuto">CT
</div>
93 var transformKeyframes
= [
94 {transform
: 'translateX(250px)'},
95 {transform
: 'translateX(500px)'}
101 leftAuto
.animate(leftKeyframes
, {
107 transformAuto
.animate(transformKeyframes
, {