英 [?k?nv?s]? ?美 [?k?nv?s]??

n.帆布;油畫(布)

vt.用帆布覆蓋

adj.帆布制的

第三人稱單數(shù): canvases 復(fù)數(shù): canvases 現(xiàn)在分詞: canvasing 過(guò)去式: canvased 過(guò)去分詞: canvased

html canvas標(biāo)簽 語(yǔ)法

canvas是什么意思?

作用:定義圖形,比如圖表和其他圖像。

說(shuō)明:<canvas> 標(biāo)簽只是圖形容器,通過(guò)腳本 (通常是JavaScript)來(lái)完成,可以使用canvas繪制路徑,盒、圓、字符以及添加圖像。

注釋:<canvas> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。Internet Explorer 8 以及更早的版本不支持 <canvas> 標(biāo)簽。

html canvas標(biāo)簽 示例

<!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>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例