canvas
英[?k?nv?s]? ?美[?k?nv?s]??
n.帆布;油畫(布)
vt.用帆布覆蓋
n.帆布;油畫(布)vt.用帆布覆蓋## #####adj.帆布製的###html5<canvas>標籤 語法
作用:<canvas> 標籤定義圖形,例如圖表和其他圖像。 <canvas> 標籤只是圖形容器,您必須使用腳本來繪製圖形。
參數(shù):
#屬性 | 值 | #描述 |
height | pixels | 設(shè)定canvas 的高度。 |
width | pixels | 設(shè)定 canvas 的寬度。 |
html5<canvas>標籤 範例
<!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>
#點擊 "執(zhí)行實例" 按鈕查看線上實例