html The canvas tag is used to define graphics, such as charts and other images. The
What does canvas mean? How to use html canvas tag?
Function: Define graphics, such as charts and other images.
Description:
Note:
The
html canvas tag example
<!DOCTYPE HTML> <html> <body> <canvas id="myCanvas">your browser does not support the canvas tag </canvas> <script type="text/javascript"> var canvas=document.getElementById('myCanvas'); var ctx=canvas.getContext('2d'); ctx.fillStyle='#FF0000'; ctx.fillRect(0,0,80,100); </script> </body> </html>
Effect:
The above is the detailed content of How to use html canvas tag. For more information, please follow other related articles on the PHP Chinese website!