resize-013.html (941B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Basic User Interface Test: resizing canvas</title> 4 <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net"> 5 <link rel="help" href="https://drafts.csswg.org/css-ui-3/#resize"> 6 <meta name="flags" content="interact may"> 7 <meta name="assert" content="UAs may apply the resize property to <canvas> regardless of the value of the overflow property."> 8 <style> 9 canvas { resize: both; } 10 </style> 11 12 <p>Test passes if both <strong>width</strong> and <strong>height</strong> of the orange box below can be adjusted (for instance by dragging the bottom-right corner).</p> 13 14 <canvas id="test" width="100" height="100"> 15 <canvas> is not supported. This test is non conclusive. 16 </canvas> 17 <script> 18 var canvas = document.getElementById('test'); 19 if (canvas.getContext) { 20 var ctx = canvas.getContext('2d'); 21 ctx.fillStyle = '#FFA500'; 22 ctx.fillRect (0, 0, 100, 100); 23 } 24 </script>