two-element-one-custom-property-animation-ref.html (358B)
1 <!DOCTYPE html> 2 <html> 3 <body> 4 <canvas id ="canvas" width="200" height="400"></canvas> 5 <script> 6 var canvas = document.getElementById('canvas'); 7 var context = canvas.getContext("2d"); 8 context.fillStyle = 'rgb(100, 0, 100)'; 9 context.fillRect(0, 0, 200, 200); 10 context.fillStyle = 'rgb(100, 100, 0)'; 11 context.fillRect(0, 200, 200, 200); 12 </script> 13 </body> 14 </html>