blob: 089880ad0327bfd1c1b31b932703fd64564b829e [file] [log] [blame]
div {
position: relative;
height: 100px;
width: 100px;
background: blue;
transform: translateZ(0);
-webkit-animation-direction: alternate;
-webkit-animation-duration: 2s;
-webkit-animation-timing-function: linear;
-webkit-animation-iteration-count: 6;
.test0 {
-webkit-animation-delay: -30s;
.test1 {
-webkit-animation-delay: -3s;
.test2 {
-webkit-animation-delay: 0s;
.test3 {
-webkit-animation-delay: 3s;
.anim-left {
-webkit-animation-name: anim-left;
z-index: 100;
.anim-transform {
-webkit-animation-name: anim-transform;
z-index: 200;
@-webkit-keyframes anim-left {
0% {
left: 0px;
100% {
left: 300px;
@-webkit-keyframes anim-transform {
0% {
transform: translateX(0px);
100% {
transform: translateX(300px);
Each section below has two boxes, the top runs on the main thread, the bottom
on the compositor. The animations should be identical but start at different
This test is successful if the boxes are mostly in sync (there might be a small
offset between them).
Start delay -30s (starts 30 seconds into animation by which the animation has finished, hence no animation)
<div class='test0 anim-left'></div>
<div class='test0 anim-transform'></div>
Start delay -3s (starts 3 seconds into the animation, should finish first.)
<div class='test1 anim-left'></div>
<div class='test1 anim-transform'></div>
Start delay 0s (no start delay, should finish second.)
<div class='test2 anim-left'></div>
<div class='test2 anim-transform'></div>
Start delay 3s (starts 3 seconds after page load, should finish last.)
<div class='test3 anim-left'></div>
<div class='test3 anim-transform'></div>