OLD | NEW |
1 <style> | 1 <style> |
2 .target { | 2 .target { |
3 position: absolute; | 3 position: absolute; |
4 font-size: 100px; | 4 font-size: 100px; |
5 width: 100px; | 5 width: 100px; |
6 height: 100px; | 6 height: 100px; |
7 border: solid; | 7 border: solid; |
8 } | 8 } |
9 #rotateAdd { color: red; } | 9 #rotateAdd { color: red; } |
10 #rotateReplace { color: red; } | 10 #rotateReplace { color: red; } |
11 #transform { color: green; } | 11 #transform { color: green; } |
12 </style> | 12 </style> |
13 There should be no red visible. | 13 There should be no red visible. |
14 <div class="target" id="rotateAdd">F</div> | 14 <div class="target" id="rotateAdd">F</div> |
15 <div class="target" id="rotateReplace">F</div> | 15 <div class="target" id="rotateReplace">F</div> |
16 <div class="target" id="transform">F</div> | 16 <div class="target" id="transform">F</div> |
17 <script> | 17 <script> |
18 var timing = {fill: 'forwards', iterations: 0.75}; | 18 var timing = {fill: 'forwards', iterations: 0.75}; |
19 rotateAdd.style.rotate = '90deg 1 0 0'; | 19 rotateAdd.style.rotate = '1 0 0 90deg'; |
20 rotateAdd.animate([ | 20 rotateAdd.animate([ |
21 {rotate: '-180deg 0 1 0', composite: 'add'}, | 21 {rotate: '0 1 0 -180deg', composite: 'add'}, |
22 {rotate: '90deg 0 0 1'}, | 22 {rotate: '0 0 1 90deg'}, |
23 ], timing); | 23 ], timing); |
24 rotateReplace.animate([ | 24 rotateReplace.animate([ |
25 {rotate: '180deg 0 -0.707107 -0.707107'}, | 25 {rotate: '0 -0.707107 -0.707107 180deg'}, |
26 {rotate: '90deg 0 0 1'}, | 26 {rotate: '0 0 1 90deg'}, |
27 ], timing); | 27 ], timing); |
28 transform.animate([ | 28 transform.animate([ |
29 {transform: 'rotate3d(1, 0, 0, 90deg) rotate3d(0, 1, 0, -180deg)'}, | 29 {transform: 'rotate3d(1, 0, 0, 90deg) rotate3d(0, 1, 0, -180deg)'}, |
30 {transform: 'rotate3d(0, 0, 1, 90deg)'}, | 30 {transform: 'rotate3d(0, 0, 1, 90deg)'}, |
31 ], timing); | 31 ], timing); |
32 </script> | 32 </script> |
OLD | NEW |