感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>
<body>
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #ccc"></canvas>
</body>
</html>
xxxxxxxxxx
var c = document.getElementById('myCanvas')
var ctx = c.getContext('2d')
ctx.fillStyle="#ff0000"
ctx.fillRect(0,0,150,75)
输入 CSS 代码……