Images Canvas HTML
- Page précédente Texte Canvas
- Page suivante Introduction à l'horloge
Canvas - 图像
要在画布上绘制图像,请使用以下方法:
- drawImage(image,x,y)
实例

JavaScript:
window.onload = function() { const canvas = document.getElementById("myCanvas"); const ctx = canvas.getContext("2d"); const img = document.getElementById("tulip"); ctx.drawImage(img, 10, 10); }
Veuillez également consulter :
- Page précédente Texte Canvas
- Page suivante Introduction à l'horloge