![]() |
create a canvas in:HTML5 |
<!DOCTYPE html> <html> <body> <canvas id="canvas" width="200" height="100" style="border:1px solid #000000;">your browser not support html 5</canvas> </body> </html> <html>
<canvas id="canvas" width="200" height="100" style="border:1px solid #000000;"></canvas>
program "canvas" allows you to create a place to draw something.RESULT
If you want to add "background color", you just replace the code "# 000000" with other colors.like the example below.
<!DOCTYPE html> <html> <body> <canvas id="canvas" width="200" height="100" style="background: azure;border:1px solid #000000;">your browser not support html 5</canvas> </body> </html> <html>RESULT
No comments:
Post a Comment