Difference between revisions of "Canvas Element"

From Level Access Web Labs
Jump to navigation Jump to search
Line 9: Line 9:
 
<script>
 
<script>
 
var canvas=document.getElementById('myCanvas');
 
var canvas=document.getElementById('myCanvas');
 +
var ctx=canvas.getContext('2d');
 +
ctx.fillStyle='#00FF00';
 +
ctx.fillRect(0,0,90,90);
 +
var canvas=document.getElementById('myCanvas2');
 
var ctx=canvas.getContext('2d');
 
var ctx=canvas.getContext('2d');
 
ctx.fillStyle='#00FF00';
 
ctx.fillStyle='#00FF00';

Revision as of 22:49, 17 July 2020

There is a green box on the screen.

Test results for canvus-

All screen readers and browsers tested announced that there is a green box on the screen. this is the text that is in the paragraph inside of the canvus.