上一篇文章中简单的举了2个canvas的例子,这里对canvas的画图进一步学习。
IE8或以下不支持!
图片重叠阴影
曲线
Image repeat
Repeat the images:
- Change the numbers in line6 and re-run
Image frame
The images used are as follows:
Add frame to images:
- Change the third line to g.drawImage(document.getElementById('source'), 68, 21, 150, 125, 20, 20, 87, 104); and re-run
- Change the other numbers and re-run