html5中的畫布canvas----畫出簡單的矩形、三角形

首先在html頁面中放置一個canvas元素,其中canvas元素應該具有三個屬性ID、width、height。javascript <canvas id="demo" width="600" height="600"></canvas>html 取得canvas對象並取得上下文var cxt=document.getElementById('demo').getContext("2d");其中
相關文章
相關標籤/搜索